Originally Posted by
swiftxjames
currently i'm working on a java assignment in class. the instructor is asking us to repeat a different part of the program.
for example, through an if statement, if the input from the user meets the condition of the if statement then the loops statement before it would be repeated.
i dont know how im suppose to write that because i am new to java.
any help would be appreciated.
You can usually repeat a part of a program by
while(condition)
{
code
}
or
for (int x = whatever; x < something; x++)
{
code
}
or something like that.