hi im new to java.i wrote a simple programme and need a little help.i should enter an int as the input but when i entere a string, it gives an exception.

Exception in thread "main" java.lang.NumberFormatException: For input string:

i need a dialog box to be appeared when i enter a string instead of an int displaying "invalid" or something like that.here is my programme

how do i enter my coding here?

without seeing your actual code, and without knowing what it is you enter as input, it might be a bit difficult to see what you are doing wrong.

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.