Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Teach me cool stuff about hava, fellows.

Name: Anonymous 2008-06-13 17:07

Fellows, I'm learning Java right now, it's my first programing language, and I only now the most basic things. Post cool codes in this thread so I can learn stuff and make this world a better place to be cool with fellow programmers.

Name: Anonymous 2008-06-13 17:24

This one is easy, try it, I call it "The gay test":


import static java.lang.System.out;
import java.util.Scanner;

class Test {
    public static void main(String args[]) {

        Scanner myScanner = new Scanner(System.in);
        String reply;
       
        do {
            out.print("Are you gay? (s/n) ");
            reply = myScanner.next();
        } while (!reply.equals("s") &&
                         !reply.equals("n")); 
       
        if (reply.equals("s")) {
            out.println("That's Gay");
        } else {
            out.println("Don't lie");
        }
    }
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List