jenius
04-07-2010, 06:26 PM
So I'm a huge beginner here, but I'm just trying to write something super simple, and it won't compile - not sure what I'm doing wrong. Can anyone toss me some help here?
import javax.swing.*;
public class Testing {
public static void main(String args[]) {
int num = JOptionPane.showInputDialog("Pick a number from 1 to 5");
if (num == 1) {
System.out.println("your a faggot");
} else if (num == 2) {
System.out.println("your the man");
} else if (num == 3) {
System.out.println("your retarded");
} else if (num == 4) {
System.out.println("i love you");
} else if (num == 5) {
System.out.println("you are god");
} else {
System.out.println("You cheated, and entered in" + num + "Try reading the instructions, *****");
}
}
}
Thank you so much everybody!
import javax.swing.*;
public class Testing {
public static void main(String args[]) {
int num = JOptionPane.showInputDialog("Pick a number from 1 to 5");
if (num == 1) {
System.out.println("your a faggot");
} else if (num == 2) {
System.out.println("your the man");
} else if (num == 3) {
System.out.println("your retarded");
} else if (num == 4) {
System.out.println("i love you");
} else if (num == 5) {
System.out.println("you are god");
} else {
System.out.println("You cheated, and entered in" + num + "Try reading the instructions, *****");
}
}
}
Thank you so much everybody!