Coding Java : Kata terakhir Versi BufferedReader
Minggu, 31 Oktober 2010
, Posted by ronaldoccd at 15.58
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class katakata {
public static void main( String[] args ){
BufferedReaderdataIn=new BufferedReader(new InputStreamReader( System.in) );
String kata1 = "";
System.out.println("Masukan Kata Anda :");
try{
kata1 = dataIn.readLine();
}catch( IOException e ){
System.out.println("Error!");
}
String kata2 = "";
System.out.println("Masukan Kata Anda :");
try{
kata2 = dataIn.readLine();
}catch( IOException e ){
System.out.println("Error!");
}
String kata3 = "";
System.out.println("Masukan Kata Anda :");
try{
kata3 = dataIn.readLine();
}catch( IOException e ){
System.out.println("Error!");
}
System.out.println("Kata Anda " + kata1 + " " + kata2 + " " + kata3 + "!");
}
}
Currently have 0 komentar: