Results 1 to 3 of 3
  1. #1
    bbtgirl is offline Member
    Join Date
    Jan 2009
    Posts
    4
    Rep Power
    0

    Default Whats wrong with this code?

    //Exercise 1.5/**


    class DoThisOneTwinkle { //inport one

    public static void main(String[] args) {
    javax.swing.JOptionPane.showMessageDialog(null,"Tw inkle Twinkle little star");
    doThis();
    javax.swing.JOptionPane.showMessageDialog(null,"Li ke a diamond in the sky");
    }
    public static void doThis()(
    javax.swing.JOptionPane.showMessageDialog(null,"Ho w I wonder what you are");
    javax.swing.JOptionPane.showMessageDialog(null,"Up above the wrold so high");

    )
    }
    public static void doThisOne() (
    javax.swing.JOptionPane.showMessageDialog(null,"Ho w I wonder what you are");
    javax.swing.JOptionPane.showMessageDialog(null,"Up above the world so high");
    }



    -----------------------------------------------------------------------
    is it because doThisOne and doThis isn't given a value?

  2. #2
    CJSLMAN's Avatar
    CJSLMAN is offline Moderator
    Join Date
    Oct 2008
    Location
    Mexico
    Posts
    1,159
    Rep Power
    8

    Default

    huh... what is the problem or question?

    Luck, CJSL
    Chris S.
    Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.

  3. #3
    DrKush's Avatar
    DrKush is offline Member
    Join Date
    Feb 2009
    Location
    Charloot NC
    Posts
    14
    Rep Power
    0

    Default

    I imported the whole java.lang, dont know if you need all that, but it works on my end. also note some of the bracers were ( or ). What exactly are you trying to do with this program?
    import java.lang.*;
    public class DoThisOneTwinkle //need to define public or privte class
    {
    public static void main(String[] args)
    { //bracer was (
    javax.swing.JOptionPane.showMessageDialog(null,"Tw inkle Twinkle little star");
    doThis();
    javax.swing.JOptionPane.showMessageDialog(null,"Li ke a diamond in the sky");
    }
    public static void doThis()
    {
    javax.swing.JOptionPane.showMessageDialog(null,"Ho w I wonder what you are");
    javax.swing.JOptionPane.showMessageDialog(null,"Up above the world so high");

    }//bracer was )

    public static void doThisOne()
    {//bracer was (
    javax.swing.JOptionPane.showMessageDialog(null,"Ho w I wonder what you are");
    javax.swing.JOptionPane.showMessageDialog(null,"Up above the world so high");
    }
    }
    Last edited by DrKush; 02-25-2009 at 03:53 AM.
    I've got an idea--an idea so smart that my head would explode if I even began to know what I'm talking about.

Similar Threads

  1. whats wrong with this class declaration?
    By blossompark in forum New To Java
    Replies: 5
    Last Post: 11-30-2008, 02:18 AM
  2. Whats wrong with my maths???
    By soc86 in forum New To Java
    Replies: 4
    Last Post: 11-03-2008, 05:52 PM
  3. whats the code that we need to connect oracle10g with the netbeans
    By katko0ota in forum Enterprise JavaBeans (EJB)
    Replies: 6
    Last Post: 07-15-2008, 05:52 PM
  4. Cannot understand whats wrong
    By Lehane_9 in forum New To Java
    Replies: 1
    Last Post: 03-06-2008, 07:57 PM
  5. Whats wrong with my code???
    By Soda in forum New To Java
    Replies: 2
    Last Post: 12-06-2007, 12:54 PM

Posting Permissions

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