“Connecting the dots”

java study 본문

JAVA

java study

kims1997 2023. 4. 10. 09:46
반응형

KEYboard buffer 

buffer(임시기억장소)

Queue(Flfo)"선입선출

(First ln First Out)

 

 

import java.io.IOException;

 

public class Q13 {

 

public static void main(String[] args) throws IOException {

 

 

System.out.println("데이터를 입력하세요.끝내시리연 [Ctrl]+Z를 누르세요.");

 

 

while(true) {

 

//키보드 버퍼로부터 1byte읽어오기

int ch = System.in.read();

 

//ctrl+z를 누르면-1을 반환

if(ch==-1)break;

 

 

System.out.printf("%c",ch);

}

}

 

}

반응형