Parse decimal string into an int in Java
Hi, Let me thank you for your time first off. I have what most of you will probably consider a simple question.
I am using a JOptionPane.showInputDialog to prompt the user to enter a number and then parsing an int from that string. How can I, if the user enters a decimal number, round it to the nearest integer number and parse it to an int. Thanks again.
|