This code ref: from http://neatbeans.blogspot.com/2011/04/sourcode-input-data-dari-keyboard-java.html
credit for owner blog. thanks
^_^
package java_learn1;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
//import java.io.*;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author bossnya[at]gmail[dot]com
*/
public class Class1 {
public static void main(String[]args) throws IOException {
// BufferedReader(new InputStreamReader(System.in));
BufferedReader stdin=new
BufferedReader(new InputStreamReader(System.in));
String nama,kelas,jurusan;
System.out.println("Masukan data di bawah ini : ");
System.out.println("=========================== ");
System.out.println("Nama = "); nama=stdin.readLine();
System.out.println("Jurusan = "); jurusan=stdin.readLine();
System.out.println("Kelas = "); kelas=stdin.readLine();
System.out.println("Hello " + nama +" Selamat datang");
System.out.println("=========================== ");
System.out.println("Apakah benar bio data anda ");
System.out.println("Nama : " + nama);
System.out.println("Jurusan : " + jurusan);
System.out.println("Kelas : " + kelas);
}
}
Comments
Post a Comment