Network disconnected
Description
주어진 코드가 아래와 같이 출력되게 만들고 싶습니다. 빈칸에 알맞은 타입을 채워 문제를 해결해 보세요.
false
a
20
2147483648
힌트: 아래의 예를 참고하여 문제를 해결하세요.
boolean isFun = true;
char c ='f';
int x = 59;
// long 타입 값에는 소문자 l이나 대문자 L을 붙여야 합니다.
long big = 3456789L;
// float 타입 값에는 소문자 f나 대문자 F를 붙여야 합니다.
float f = 32.5f;
double d = 23.34;
- int형 변수는 최대 2147483647까지 담을 수 있습니다. 더 큰 값을 사용하고 싶다면 long형을 사용하세요.
Question type: Fill in the blank
- You need to fill in the blank with the appropriate code.
- You cannot modify the given code.
- An error message will appear in the result if you leave the blank empty.
1
2
3
4
5
6
7
8
9
10
11
12
13
public class PrimitiveDataTypeExam {
public static void main(String[] args) {
isFun = false;
charValue = 'a';
intValue = 20;
longValue = 2147483648L;
System.out.println(isFun);
System.out.println(charValue);
System.out.println(intValue);
System.out.println(longValue);
}
}
Result
Stop
Result of [Run Test] or [Submit] will be displayed here