import java.util.Scanner;
public class Solution {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int i = scan.nextInt();
String s = scan.nextLine();
double d = scan.nextDouble();
System.out.println("String: " + s);
System.out.println("Double: " + d);
System.out.println("Int: " + i);
}
}
오류 발생
import java.util.Scanner;
public class Solution {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int i = scan.nextInt();
double d = scan.nextDouble();
scan.nextLine();
String s = scan.nextLine();
System.out.println("String: " + s);
System.out.println("Double: " + d);
System.out.println("Int: " + i);
}
}
문제 해결
'java' 카테고리의 다른 글
mvc 패턴 구성요소 이해하기 (0) | 2024.07.18 |
---|---|
form에서 받은 값을 controller로 전달하기 (0) | 2023.09.27 |
HackerRank - Java 7 - 3단계 If-Else (0) | 2023.05.04 |
catch TypeError: Cannot read properties of undefined 해결하기 (0) | 2023.04.28 |
11-2~12. 입력과 출력, 직접 컴파일 (0) | 2023.01.23 |