0

Cannot find symbol for a basic java command?

import javax.swing.J0ptionPane;
public class HelloGUI
{
  public static void main (String[] args)
    {
     J0ptionPane.showMessageDialog(null, "Hello, world!");
    }
}



c:\Users\Nathanial\Desktop\myJavaPgms>javac HelloGUI.java
HelloGUI.java:1: error: cannot find symbol
import javax.swing.J0ptionPane;
                  ^
  symbol:   class J0ptionPane
  location: package javax.swing
HelloGUI.java:6: error: cannot find symbol
     J0ptionPane.showMessageDialog(null, "Hello, world!");
     ^
  symbol:   variable J0ptionPane
  location: class HelloGUI
2 errors
2
Contributors
2
Replies
16
Views
2 Years
Discussion Span
Last Post by SkateX
0

Oh, Traevel you are right. I was troubleshooting another issue and changed the O to a 0 to see if that was it and never changed it back. Thanks, works now..

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.