import java.io.*;
/*contoh menggunakan class bufferedreader*/
public class quiz
{
public static void main (String[]args){
try {
String nNpm ;
String nNama;
String nKelas;
String nJurusan;
String nAlamat;
String nMotto;
BufferedReader in = new BufferedReader (new InputStreamReader (System.in));
System .out.print ("masukan NPM : ");
nNpm = in.readLine ();
System.out.print ("masukan Nama : ");
nNama = in.readLine();
System.out.print ("masukan Kelas : ");
nKelas = in.readLine();
System.out.print ("masukan Jurusan : ");
nJurusan = in.readLine();
System.out.print ("masukan Alamat : ");
nAlamat = in.readLine();
System.out.print ("masukan Motto : ");
nMotto = in.readLine();
System.out.println();
System.out.println("Npm "+nNpm);
System.out.println("Nama "+nNama);
System.out.println("Kelas "+nKelas);
System.out.println("Jurusan "+nJurusan);
System.out.println("Alamat "+nAlamat);
System.out.println("Motto "+nMotto);
}catch (Exception e){
System.out.println(e);
}}}
/*contoh menggunakan class bufferedreader*/
public class quiz
{
public static void main (String[]args){
try {
String nNpm ;
String nNama;
String nKelas;
String nJurusan;
String nAlamat;
String nMotto;
BufferedReader in = new BufferedReader (new InputStreamReader (System.in));
System .out.print ("masukan NPM : ");
nNpm = in.readLine ();
System.out.print ("masukan Nama : ");
nNama = in.readLine();
System.out.print ("masukan Kelas : ");
nKelas = in.readLine();
System.out.print ("masukan Jurusan : ");
nJurusan = in.readLine();
System.out.print ("masukan Alamat : ");
nAlamat = in.readLine();
System.out.print ("masukan Motto : ");
nMotto = in.readLine();
System.out.println();
System.out.println("Npm "+nNpm);
System.out.println("Nama "+nNama);
System.out.println("Kelas "+nKelas);
System.out.println("Jurusan "+nJurusan);
System.out.println("Alamat "+nAlamat);
System.out.println("Motto "+nMotto);
}catch (Exception e){
System.out.println(e);
}}}
0 comments