Senin, 12 Maret 2012

Favorite Character

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 + "! :)");
 }
}

hasil outputnya adalah :
Hi, what's your favorite character?
ristha
efb is a good choice!


Selamat Memcoba :D

Tidak ada komentar:

Posting Komentar