• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

small program on methods

 
naveen vamsi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i just started java recently this program gives so many errors please help
 
Abdulla S Mamuwala
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please can you list some of the errors that you are getting?
 
naveen vamsi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abdulla S Mamuwala wrote:Please can you list some of the errors that you are getting?
Capture11.JPG
[Thumbnail for Capture11.JPG]
errors
 
Abdulla S Mamuwala
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer to your problem has been given very nicely by compiler in the screen shot you have shared.
Compiler says that it is expecting an "identifier" that you have not provided in your program. It is also telling you the line numbers that have problems. So make the compiler happy and give it what it wants! I am sure you can do it!
 
Campbell Ritchie
Sheriff
Pie
Posts: 50175
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

I have added code tags to your code, and you can see how much better it looks Please avoid screenshots.

I can see several other syntax errors in your code; you are putting ; instead of method bodies, and then methods inside other methods.
 
Mansukhdeep Thind
Ranch Hand
Posts: 1158
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You seem to love football. I doubt whether your name is actually Messi Kaka. Anyways, welcome again to the ranch. Which book are you studying Java from?
 
Rajdeep Biswas
Ranch Hand
Posts: 224
1
Eclipse IDE Java Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
messi kaka wrote:hi,
i just started java recently this program gives so many errors please help

Hi messi kaka, welcome. Can you plesae tell us what are the methods in your class and what is the objective? I am not suspecting anything about what you wrote at this moment.
 
Ivan Jozsef Balazs
Rancher
Posts: 981
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



Methods declared inside methods are not supported.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic