Results 1 to 3 of 3
Thread: Whats wrong with this code?
- 02-25-2009, 02:58 AM #1
Member
- Join Date
- Jan 2009
- Posts
- 4
- Rep Power
- 0
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?
- 02-25-2009, 03:00 AM #2
huh... what is the problem or question?
Luck, CJSLChris S.
Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.
- 02-25-2009, 03:51 AM #3
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
-
whats wrong with this class declaration?
By blossompark in forum New To JavaReplies: 5Last Post: 11-30-2008, 02:18 AM -
Whats wrong with my maths???
By soc86 in forum New To JavaReplies: 4Last Post: 11-03-2008, 05:52 PM -
whats the code that we need to connect oracle10g with the netbeans
By katko0ota in forum Enterprise JavaBeans (EJB)Replies: 6Last Post: 07-15-2008, 05:52 PM -
Cannot understand whats wrong
By Lehane_9 in forum New To JavaReplies: 1Last Post: 03-06-2008, 07:57 PM -
Whats wrong with my code???
By Soda in forum New To JavaReplies: 2Last Post: 12-06-2007, 12:54 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks