Issue
Screenshot of CodeA beginner here, I was following a video tutorial, and the narrator was able to use the class but I'm not, there must be something somewhere that I'm missing please help
I suspected it might have something to do with the package or the previous class, so I created a new project, package and class and still the error was still there
Solution
You have a typographical error in your code.
Rather than:
JOptionPane.showInput.Dialog("Enter your name");
your code should read:
JOptionPane.showInputDialog("Enter your name");
You have a stray dot (.) in your code. Java dot notation never follows a method with a class name like that.
Apparently, Eclipse has wrapped the actual error (maybe "unresolved method") in that "unresolved compilation problem" message so that it could at least attempt to run the code.
Answered By - MarsAtomic
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.