Hi, so I'm new with Java and the programming thing. Here's my problem. I need to do an errortrap without using a loop and creating a method solely for errortrapping so I figured i need to use try and catch statements but I'm not sure how. Basically my problem is that I need to get a user input to proceed to another method and to exit. Say for example, the program requires you to input 'e' to exit and 'p' to proceed. Anything else would be an error. Can anyone give me an example?
Daigan 0 Junior Poster in Training
stultuske 1,116 Posting Maven Featured Poster
Daigan 0 Junior Poster in Training
stultuske 1,116 Posting Maven Featured Poster
Daigan 0 Junior Poster in Training
stultuske 1,116 Posting Maven Featured Poster
Daigan 0 Junior Poster in Training
Slimmy 0 Junior Poster in Training
Daigan 0 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.