Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- ai
- 스프링부트
- 스프링
- bufferdreader
- 자바
- eof
- mongodb
- 조건문
- k8s
- redis
- HTTP
- Apollo
- TCP
- 백준알고리즘
- java
- Android
- Mongoose
- Scanner
- nodejs
- LangChain
- graphql
- Spring
- restapi
- 서버
- 프로그래머스
- puppeteer
- MapReduce
- mysql
- java11
- Docker
Archives
- Today
- Total
목록readLine() (1)
자라나라 개발머리
[JAVA] BufferdReader read(), readLine() 차이
궁금한 것 read()와 readLine()의 차이는 무엇이고, 왜 readLine()을 쓸까? 실행 코드 package pratice; import java.io.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int a = Integer.parseInt(br.readLine()); int b = br.read(); System.out.println(a); System.out.println(b); } } 실행결과 readLine()은 입력한대로 int형 1이 나왔지만, re..
Java
2022. 7. 26. 15:35