• Post Reply Bookmark Topic Watch Topic
  • New Topic

do while error  RSS feed

 
Alex Mun
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have the following code:


When I tried to run the program it displayed the following error:

Exception in thread "main" java.lang.Error: Unresolved compilation problem:
a cannot be resolved to a variable

at Preguntas.main(Preguntas.java:16)

Anyone knows why I displayed this error?

Thanks.

[Edit - added code tags - see UseCodeTags]
 
J. Kevin Robbins
Bartender
Posts: 1801
28
Chrome Eclipse IDE Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Likes 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the scope of variable "a".
 
Campbell Ritchie
Marshal
Posts: 56541
172
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And do you really want to use || after while?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!