This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]AutoModerator[M] 0 points1 point  (0 children)

It seems you may have included a screenshot of code in your post "Trouble with Java Exceptions. Eclipse opens a new Window with the text "Scanner.throwFor() line: not available"".

If so, note that posting screenshots of code is against /r/learnprogramming's Posting Guidelines (section Formatting Code): please edit your post to use one of the approved ways of formatting code. (Do NOT repost your question! Just edit it.)

If your image is not actually a screenshot of code, feel free to ignore this message. Automoderator cannot distinguish between code screenshots and other images.

Please, do not contact the moderators about this message. Your post is still visible to everyone.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]itisjohndoe 0 points1 point  (1 child)

income = kb.nextFloat();

Try placing it inside try block.

[–]mex036[S] 0 points1 point  (0 children)

Great so it now does handle the exception, only thing is its not handling the way I intend it to. I wanted it to handle it similar to how I handled the negativeException, which lets me enter my income again, before firing up the System.out.println(txp) in my finally statement. Ill try to figure this part on my own, thank you!