JMemo013

キー入力受付け
import java.io.IOException;

public class KeyIn {
    public static void main(String[] args) {
        String x = null;

        try {
            byte[] b = new byte[12];
            System.in.read(b);
            x = new String(b, "us-ascii");
            System.out.println("["+x+"]");

        } catch (IOException e) {
            e.printStackTrace();

        }
    }
}
最終更新:2011年08月28日 11:41