• Post Reply Bookmark Topic Watch Topic
  • New Topic

cannot be resolved to a variable  RSS feed

 
Werner Holt
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey, I am new to java and for some reason the return statement does not work and I don't see what did I do wrong.
I will appreciate your help.



 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66304
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch!

min and max are declared inside the for loop and so are not in scope for the return statement.

P.S. Please be sure to use code tags when posting code to the forums. Unformatted or unindented code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please click this link ⇒ UseCodeTags ⇐ for more information. Properly indented and formatted code greatly increases the probability that your question will get quicker, better answers.

I've gone ahead and added the code tags for you. See how much easier the code is to read?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!