• Post Reply Bookmark Topic Watch Topic
  • New Topic

Multiple Parameters  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
in the lesson multiple parameters, i wrote the following on eclipse

and it gave me fault i would like to know why
 
Bartender
Posts: 1664
37
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi mostafa, Welcome to coderanch.

use code tags to post your code. I have edited your post to include them. Also share the 'fault' in your post so that people can help you better.
Now that your code is readable, I see that you have defined a method within another method. Java does not allow that.
 
lowercase baba
Bartender
Posts: 12565
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As salvin said, it's much easier to help you if you post the error you see...but i'm guessing that it's because you are declaring a method inside a method. That's not allowed in java.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!