Created
March 4, 2010 21:22
-
-
Save tmountain/322128 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
travis@travis-desktop:/tmp/menu$ cat MenuItem.java | |
class MenuItem { | |
private String item; | |
public abstract void run(); | |
public MenuItem(String item) { | |
item = item; | |
} | |
} | |
travis@travis-desktop:/tmp/menu$ cat Base.java | |
public class Base { | |
private MenuItem menuSearch = new MenuItem("Search") { | |
public void run() { | |
System.out.println("Item -> " + item); | |
} | |
}; | |
public void main(String[] args) { | |
Base b = new Base(); | |
} | |
} | |
MenuItem.java:1: MenuItem is not abstract and does not override abstract method run() in MenuItem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment