That is an assignment statement. The expression to the right of the = is evaluated and its value is assigned to the variable to the left of the =
This may be wrong. I missed seeing the int. ...
Type: Posts; User: Norm
That is an assignment statement. The expression to the right of the = is evaluated and its value is assigned to the variable to the left of the =
This may be wrong. I missed seeing the int. ...
You don't need to define a variable. You can do it this way:
int value2=2;
return value2;
vs
return 2; // return the 2 without using a variable
Please post the full text of any error messages you get.
The variable: level is defined in the main() method which is defined as void and does not return anything.
You need to have a return...
Yes, an if statement can be inside of a do/while statement.
do {
if(condition) {
// do this if true
}else{
// do this if false
}
// do this stuff always
Sorry, I do not understand what you are asking.
Please copy and paste here the full text of the error messages you are getting.
You need to define the level variable at the same scope (within the same pair of {}s) for all the places that you want to access it.
I can not find a line that is marked with @_@.
Can you explain what you are stuck on?
Please Edit your post and wrap your code with
<YOUR CODE HERE> to get highlighting
Post the console contents for when you execute the program that shows the problem.
If you have code you are having problems with, please post it with your questions.
I have not idea what you want the code to do or what the contents of your post means or how it is related to java...