java - Anonymous class error -


public interface imethodcallback  {     boolean execute(); }  ...  imethodcallback callback = new imethodcallback             {                 boolean execute()                 {                     return false;                 }             }; 

this results in errors. how can make in java?

you miss parentheses of constructor:

imethodcallback callback = new imethodcallback() {     public boolean execute()     {         return false;     } }; 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -