Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I'm not able to compile the below prog...can you pleas tell me what is the error in using while loop

 
chanakya nani
Greenhorn
Posts: 29
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Stefaan Dutry
Ranch Hand
Posts: 32
Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

From what i see your while loop is placed directly within a class and not within a method or initializer block, so that's your problem there.

Hope this helps.
 
Rob Spoor
Sheriff
Pie
Posts: 20388
46
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've updated your post to fix the code tags so it's easier to read. It shows that Stefaan is right. You have method declarations inside the while-if, and that's not allowed.
 
chanakya nani
Greenhorn
Posts: 29
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stefaan Dutry wrote:Hello,

From what i see your while loop is placed directly within a class and not within a method or initializer block, so that's your problem there.

Hope this helps.




Thank you very much that is helpful.
 
chanakya nani
Greenhorn
Posts: 29
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stefaan Dutry wrote:Hello,

From what i see your while loop is placed directly within a class and not within a method or initializer block, so that's your problem there.

Hope this helps.


Thank You very much...It was helpful.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic