kalo ini nampilin karakter setelah karkter yg kita inputin dari sebuah kata (max 3 kata)..
bingung kan? kita praktekin aja :D
package testjeni;
import java.io.*;
/**
*
* @author Mothed
*/
public 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, hasil outputnya adalah :
Hi, what's your favorite character?
dea
efb is a good choice!
selamat mencoba :D
Sabtu, 10 Maret 2012
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar