#I am newbie in Java. I have a doubt in below code.
1 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @long helm! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
You're wrong. That's what happens if you modify a variable inside another method, not in an enclosed block
That would make if/else constructs fairly useless
So if i would have modified the value in a method instead of conditional statement then it would have been a correct scenario?
This is a bit too abstract. Ask a more direct question
If i would have declared a method and modified the value highScore (initial 50)
let’s say highscore += 100; and print it outside the method then it would have become 150?
Too ambiguous. Just try and be faultless when you tell a theory please. (Also that sounds like the sort of things you could just try)
I understood your point. I was just trying to get double sure. I will try. Thanks a lot for help!
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.