Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jul 2012
    Location
    NYC
    Posts
    23
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Need help with this code?

    package javaapplication11;



    import javax.swing.JOptionPane;
    public class HelloApp{



    public static void main(String[] args) {

    Also, there seems to be something wrong with the JOptionPane but I can't figure it out

    {

    JOptionPane.showMessageDialog
    (null, "Hello, World!", "Greeter"
    JOptionPane.INFORMATION_MESSAGE);

    }

    }
    }

    It absolutely refuses to compile. I have no idea what to do next.
    Last edited by dannyboi; 07-25-2012 at 08:25 PM.

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    Don't forget to post your error messages as well.
    You're missing a comma. I'd remove those excess curly braces as well as they can become annoying to follow.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •