Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

im a newbie in java and i need help. im a student

807589Jan 8 2009 — edited Jan 9 2009
im an I.T student in Adamson University here in the philippines i went here to ask help about our activity in school about java. our professor told us to make a program in java (btw were using netbeans) that will ask the user his birth year and then the output will tell the zodiac sign of the year entered. she told us (our prof) to make it using showInputDialog. and then to show the output we must use the JOptionPane.showMessageDialog.

i try to do it but i found myself in trouble bcoz im new in java.

i try to to it and here's what i did


import javax.swing.JOptionPane;
public class Zodiac;
{
public static void main(String args[])
{
String name=JOptionPane.showInputDialog("Enter your year of birth?");
String message=String.format("Your zodiac sign is tiger");
JOptionPane.showMessageDialog(null,message);

?
?
?

i knew that i need to use conditional statements here but i dont know where to put it and how to declare the JOptionPane.etc.
pls help me asap im a newbie.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 6 2009
Added on Jan 8 2009
36 comments
356 views