Okay. I can create and access user input and then manipulate it. What I want to do is create an 'if else' statement that depends if the user entered 'yes' or 'no' and then go on in the program accordingly. I want 'yes' to go somewhere else in the program and to display a 5 second message before doing so and 'no' to exit the program. How do I go about doing this? I know I need some sort of a label in the program but every time I try it I get a compilation error.
It'd be easier to help you with your problem if you'd actually post the error message you are getting. In fact, show us your code too (and be sure to use the UBB code tags so that the formatting of your code will be preserved). bear
Hi, Nate, and welcome to JavaRanch! A label is not really the route that you want to go; most modern programming paragidms discourage the use of labels. Object-oriented programming does this in particular; it is too "proceedure-oriented." That being said, there has to be some amount of procdures in any code; if-else statements and the like are testament to that. What you really want to do is create separate methods (sort of like using labels, but more like sub-routines) for your code. What follows is a sample of the type of structure that you would use to acheive what you describe
Hope this helps. If you have any further questions, we are here to help.
Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.