Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Code do not run

 
paulo cs
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Below is my code. How can I do run it?


 
Campbell Ritchie
Sheriff
Posts: 48363
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How on earth do you get it even to compile? You are trying to put a method inside another method? That is prohibited.

TryDon't try an argument > 12.
 
paulo cs
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the answer. I need to practice more. I'm delphi's programmer and I'm learning Java, so I have some basic doubt. I forgot constructor NEW.
 
Campbell Ritchie
Sheriff
Posts: 48363
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome

Look for some books. An experienced programmer might like the books by Horstmann and Cornell.

Look at the Java™ Tutorials. Although there are some things in there I disagree with, it is probably the most comprehensive Java™ reference I have ever seen.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic