Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Error in absurdly simple code

  1. #1
    Junior Member
    Join Date
    Feb 2014
    Posts
    19
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Default Error in absurdly simple code

    So this is first post, I'm new to programming in general and am starting with java, using Jrasp as an IDE.

    I was putting together code for my neice as a cool display of my skills lol when I ran into this error. I don't understand what the problem is?

     
    import javax.swing.JOptionPane;
     
    public class whatthehell
    {
     
      public static void main (String[]args)
      {
     
     
      String name;
     
     
     
      name = JOptionPane.showInputDialog("Hey whats your name weirdo!! ");
     
      JOptionPane.showMessageDialogue(null, "hey hey hey" + name);
     
     
       System.exit(0);
     
      }
    }

    The error message I receive is

    whatthehell.java:17: error: cannot find symbol
    JOptionPane.showMessageDialogue(null, "hey hey hey" + name);
    ^
    symbol: method showMessageDialogue(<null>,String)
    location: class JOptionPane
    1 error

    ----jGRASP wedge2: exit code for process is 1.
    ----jGRASP: operation complete.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Error in absurdly simple code

    Read the API doc for the JOptionPane class and see how to spell the method you are trying to use.
    If you don't understand my answer, don't ignore it, ask a question.

  3. The Following User Says Thank You to Norm For This Useful Post:

    Helplessdrowningpuppy (February 28th, 2014)

  4. #3
    Junior Member
    Join Date
    Feb 2014
    Posts
    19
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Default Re: Error in absurdly simple code

    solved.. ty

Similar Threads

  1. Help with this very simple error
    By Tctwins in forum What's Wrong With My Code?
    Replies: 6
    Last Post: February 21st, 2012, 01:54 PM
  2. Simple I/O Java Error
    By Prox in forum What's Wrong With My Code?
    Replies: 3
    Last Post: October 25th, 2011, 04:48 PM
  3. Has to be a simple error, but I can't find it.
    By fride360 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: March 22nd, 2011, 10:15 AM
  4. My code have a simple error but i dont know how to solve it !!!
    By Blackhawk1993 in forum What's Wrong With My Code?
    Replies: 6
    Last Post: March 17th, 2011, 01:12 PM
  5. Simple code error
    By robin28 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: December 7th, 2010, 03:25 PM

Tags for this Thread