• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

question about a java error

antyler

Golden Member
The error is

It is telling me it "cannot find symbol"

symbol : method ShowInputDialog(<nulltype>,java.lang.String)
location: class javax.swing.JOptionPane
JOptionPane.ShowInputDialog(null,"Enter Package letter: A, B, or C.");
^
1 error

The original code i wrote it in is:

// Get one of the package names from the user

JOptionPane.ShowInputDialog(null,"Enter Package letter: A, B, or C.");
input = keyboard.nextLine();
letter = input.charAt(0);

can anyone help here, i cant seem to find out the problem.

 
check the java api. it looks like you may have a capitalization issue. Usually method names starts with a lower-case (ie. showInputDialog)
 
Back
Top