Senin, 02 Desember 2013

Contoh BufferedReader

/*package contoh_bufferedreader;

import java.io.BufferedReader;
import java.io.InputStreamReader;

/**
 *
 * @author REC
 */
public class Contoh_BufferedReader {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        BufferedReader d=new BufferedReader(new InputStreamReader(System.in));
        String nama ="";
        System.out.println("masukkan nama anda:");
        try {
            nama=d.readLine();
     
        } catch (Exception e) {
            System.out.println("error");
            
        }
        System.out.println("HALO"+nama+"");
        
        // TODO code application logic here
    }
}*/
Share:

0 komentar:

Posting Komentar

Popular