I'm writing code that involves an if-else statement asking the user if they want to continue. I have no idea how to do this in Java. Is there like a label I can use for this?
This is kind of what I'm looking for:
--label of some sort--
System.out.println("Do you want to continue? Y/N");
if (answer=='Y')
{
goto suchandsuch;
}
else
{
System.out.println("Goodbye!");
}
Can anybody help?