Friday, 11 February 2011

contoh program java input dari user

import java.io.*;

public class Inputuser {

public static void main(String[] args) {

System.out.print("Masukkan nama Anda : ");

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

String nama = null;

try {
nama = br.readLine();
} catch(IOException ioe) {

}

System.out.println("Terima kasih, " + nama);
}
}

No comments:

Post a Comment