File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Anonymous Inner class

 
Shiva Mohan
Ranch Hand
Posts: 484
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying here to display "anonymous popcorn".



Please help me what i am doing here wrong.
 
wise owen
Ranch Hand
Posts: 2023
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Popcorn myPopcorn=new Popcorn();
You can use:

or

[ May 11, 2006: Message edited by: wise owen ]
 
Shiva Mohan
Ranch Hand
Posts: 484
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wise-Thank you very much and i got it.
 
Shiva Mohan
Ranch Hand
Posts: 484
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2023
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 104
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic