This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
The code below compiles. But how do i execute the methods of my anonymous inner classes ? The method name is public void main(){.....}
This code is only for learning, doesnt do anything useful.
How do you other wise invoke the methods of an instance? In the anonymous inner class syntax- You are actually extending the Dream class and then creating an instance of that extended class.
Ok, got it. Instances of the anonymous inner classes that extend a class (or implement an interface) can be accessed only by using a reference of the super-type (hope this makes sense).
This is the code :
PS : so many rules to remember. Are there any condensed notes/flash-cards that help in remembering them ?
here is the code finally : dont try to make sense of the random strings
Rahul Sudip Bose wrote:
PS : so many rules to remember. Are there any condensed notes/flash-cards that help in remembering them ?
Practice would make you familiar with them. You can create your own notes/flash-cards and share it here There are a few notes available. You might find them in ScjpFaq You can google for "Jonathan Giles scjp notes"