Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-21-2008, 12:25 AM
Member
 
Join Date: Jan 2008
Posts: 1
_nik_ is on a distinguished road
Pls some one to help mi wit this code
PLS some one to help me wit this code because it's says that there is some error but I can't find the error.

//For example
import javax.swing.*;
import java.util.*;

public class TestJOptionPane
{
public static void main(String[]args)
{
Date currentDate = new Date();
System.out.println("Hi! What is your name?");
System.out.println("My name is Nikolay Ivanov\n"+ currentDate)
JOptionPane.showMessageDialog(null,"nik!\n" + currentDate,
"application output",
JOptionPane.QUESTION_MESSAGE);
}
}
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 01-21-2008, 01:57 AM
CaptainMorgan's Avatar
Moderator
 
Join Date: Dec 2007
Location: NewEngland, US
Posts: 841
CaptainMorgan will become famous soon enoughCaptainMorgan will become famous soon enough
Send a message via AIM to CaptainMorgan
First, welcome to the Java Forums.

Second, what seems to be the problem? Have you tested this code by running it? If not, I suggest you do so. The error you are experiencing is so fundamental that if you can't find it in this short program, then I'm not sure programming is for you. If you've just begun, definitely start with a book like Head First Java, Kathy Sierra and Bert Bates.

Lastly, please use full English constructed sentences and words. 'pls', 'wit' and 'mi' do not satisfy this simple requirement. Not everyone writes shorthand like you, but a lot of people can read full English - this is a simple courtesy. And, please use code tags when posting code.

Thanks for your understanding and cooperation. See you around!
-Capt
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
to our beloved Java Forums!
(closes on September 4, 2008)
Want to voice your opinion on your IDE/Editor of choice?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
!
Got a little Capt'n in you? (drink responsibly)
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 02-10-2008, 01:38 AM
Member
 
Join Date: Jan 2008
Posts: 9
chitwood is on a distinguished road
Problem fixed!!
import javax.swing.JOptionPane;
import java.util.*;

public class Test {
public static void main(String[] args) {
Date currentDate = new Date();
System.out.println("Hi! What is your name?");
System.out.println("My name is Nikolay Ivanov\n"+ currentDate);
JOptionPane.showMessageDialog(null,"nik!\n" + currentDate,
"application output",
JOptionPane.QUESTION_MESSAGE);
}
}
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 02-10-2008, 03:02 AM
Member
 
Join Date: Dec 2007
Posts: 30
Leprechaun is on a distinguished road
chitwood added a ; if you didn't notice. Every statement has to end with one so... get used to it.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I need help fixing my code.. or non code? MrHuggykins New To Java 1 03-19-2008 11:12 PM
I need help on my code jason27131 New To Java 4 07-28-2007 05:23 AM
tic tac toe code zoe New To Java 1 07-23-2007 05:36 PM
Need help with my code. stormviper New To Java 0 07-12-2007 04:18 PM
Generating Code Automatically Using Custom code Template In Eclipse JavaForums Eclipse 1 04-26-2007 04:52 PM


All times are GMT +3. The time now is 10:49 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org