Rabu, 05 Desember 2012
package javaapplication3;
import java.io.*;

public class Main {

    public static void main(String[] args) {

        byte [] data = new byte[10];
        int panjang = 0;
        System.out.println("Masukan data    : ");
        try {
            panjang=System.in.read(data);
            System.out.println("Yang Anda Ketik :   ");
            System.out.write(data);
            panjang = panjang -1;
            System.out.println("Panjang karakter : "+ panjang);
        }catch (IOException e) {
            System.out.println("OZAN BIKIIN EXCEPTION");
        }
    }

}

0 komentar: