I am a beginner in Java and I am trying to use JOptionPane to display a message box but keep getting stuck with an error which I cannot figure out. i also have the same problem |
This is my code:
package mysecondProgramn; import javax.swing.JOptionPane;
public class second {
public static void main(String[] args) {
int testVal = 20;
JOptionPane.showMessageDialog(null, "The number is " + testVal);
}
}