dan data yang di inputkan;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package latihan2;
import java.io.*;
/**
*
* @author Fachrul
*/
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
System.out.print("masukkan nama anda:");
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String nama = null ;
String nobp = null ;
String alamat = null ;
try {
nama = br.readLine();
System.out.print("masukkan nobp:");
nobp = br.readLine();
System.out.print("masukkan alamat:");
alamat = br.readLine();
}
catch(IOException ioe){
System.out.println( "keasalahan IO pada saat menanyakana nama anda");
System.exit(1);
}
System.out.println("selamat datang,"+ nama);
System.out.println("nobp anda adalah: "+ nobp);
System.out.println("alamat anda adalah : "+ alamat);
}
// TODO code application logic here
}
Komentar
Posting Komentar