Pages

Kamis, 08 Maret 2012

Greet User

Ini juga output yang menggunakan stream IO :)


package testjeni;

/**
 *
 * @author emund
 */

    import java.io.*;
class GreetUser {
public static void main(String args[]) throws IOException {
System.out.println("Hi, what's your name?");
String name;

BufferedReader br = new BufferedReader(new
InputStreamReader(System.in));
name = br.readLine();
System.out.println("Nice to meet you, " + name + "! :)");
}
}



*dan outputnya adalaah ......





run:
Hi, what's your name?
Emunda Primadiayu Putri
Nice to meet you, Emunda Primadiayu Putri! :)
BUILD SUCCESSFUL (total time: 15 seconds)


0 komentar:

Posting Komentar

Twitter Delicious Facebook Digg Stumbleupon Favorites More