You are not logged in.

Dear visitor, welcome to Packageforge. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

  • Hawkes

    Administrator

    You have to register first, to connect to this user.

10

Endlosschleifen

Rating:

by Hawkes, Monday, November 2nd 2009, 12:54pm

Ohne Worte aus dem verpflichtendem Informatiktutorium...

Java source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
public class Main {

	/**
 	* @param args the command line arguments
 	*/
	public static void main(String[] args) {
    	Scanner in = new Scanner(System.in);
    	System.out.println("Ist Informatik totlangweilig?");
    	String input = null;
    	boolean first = true;
    	while ((input = in.next()).equalsIgnoreCase(first ? "Nein": "Ja")) {
            	first = false;
            	System.out.println("Bist du sicher?");
    	}

    	System.out.println("Deswegen schlafe ich hier auch ein.");
	}

}

This article has been read 1,198 times.

Tags: Informatik, Java, Universität

Categories: Universitätsalltag

Rate this article

Comments (1)

  • 1

    by SilverSystem (Monday, November 2nd 2009, 2:15pm)

    das ist jz aber nicht wahr o.O

    Ok ein Grund mehr es mir in meiner bevorstehenden Zivi Zeit beizubringen.
    Wenn die Unis im deutschsprachigem Raum ungefähr den selben Lehrplan haben, dann spar ich mir ganz einfach die nichtverpflichtenden Kurse...

Blog navigation

Next article

Das ist halt Uni...

by Hawkes (Friday, November 27th 2009, 10:44pm)

Previous article

Ubuntu 9.10

by Hawkes (Saturday, October 31st 2009, 3:27pm)