반응형
import java.util.Scanner;
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
sc.close();
참고: https://docs.oracle.com/javase/8/docs/api/java/util/Scanner.html
Scanner (Java Platform SE 8 )
Scans the next token of the input as a float. This method will throw InputMismatchException if the next token cannot be translated into a valid float value as described below. If the translation is successful, the scanner advances past the input that match
docs.oracle.com
반응형
'Programming > Java' 카테고리의 다른 글
[Java] Oracle JDBC releases Vs JDK versions (0) | 2022.10.25 |
---|---|
[Java] JDBC Test (ORACLE DB, tnsnames.ora) (0) | 2020.05.14 |
[Java] 시스템 환경변수 관련(getenv) (0) | 2020.04.25 |
[Java] 환경변수 참고 (0) | 2020.03.09 |