공부/JAVA_source
자바 입출력 (1)
초초이
2016. 10. 19. 20:01
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | import java.io.*; public class Exam_06 { public static void main(String[] ar) throws IOException{ System.out.print("키보드 하나를 누르세요 = "); //int x = System.in.read(); char x = (char)System.in.read(); System.out.println("x = " + x); System.in.read(); System.in.read(); System.out.print("숫자 하나 입력 = "); int y = System.in.read() - 48; System.out.println("y = " + y); } } | cs |