This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Anonymous Inner class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Anonymous Inner class" Watch "Anonymous Inner class" New topic
Author

Anonymous Inner class

Shiva Mohan
Ranch Hand

Joined: Jan 05, 2006
Posts: 477
I am trying here to display "anonymous popcorn".



Please help me what i am doing here wrong.
wise owen
Ranch Hand

Joined: Feb 02, 2006
Posts: 2023
Popcorn myPopcorn=new Popcorn();
You can use:

or

[ May 11, 2006: Message edited by: wise owen ]
Shiva Mohan
Ranch Hand

Joined: Jan 05, 2006
Posts: 477
Wise-Thank you very much and i got it.
Shiva Mohan
Ranch Hand

Joined: Jan 05, 2006
Posts: 477
Hi,

I am working againg on Argument defined -Anonymous inner class and i coultn't figure out how to correct the error.Please help me.


how the line 1 is showing error? It seems like i have given correctly.
wise owen
Ranch Hand

Joined: Feb 02, 2006
Posts: 2023

I had rewrited some of your codes to make it work. You can see where I had made changes.
[ May 11, 2006: Message edited by: wise owen ]
Shaliey Gowtham
Ranch Hand

Joined: Mar 20, 2006
Posts: 104
Shiva,You missed the closing curly braces inside the parameter call and have added it outside the paranthesis.
Could you get it?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Anonymous Inner class