What i have so far.
I'm trying to get it to where i can enter anything for example: lajflho142323kj lkhaf
but the program blows up if i do a mix of letters and numbers
I'm trying to get it to where i can enter anything for example: lajflho142323kj lkhaf
but the program blows up if i do a mix of letters and numbers
Code:
import javax.swing.JOptionPane;
public class morePractice {
public static void main(String[] args) {
String str;
int num1;
str=JOptionPane.showInputDialog("Enter phrase");
num1=Integer.parseInt(str);
}
}
Comment