최신 Oracle Java Platform 1Z0-815 무료샘플문제:
1. Given the code fragment:
What is the result?
A) false true true
B) false true false
C) false false true
D) true false false
2. What is the result?
Class StaticField {
static int i = 7;
public static void main(String[] args) {
StaticFied obj = new StaticField();
obj.i++;
StaticField.i++;
obj.i++;
System.out.println(StaticField.i + " "+ obj.i);
}
}
A) 10 10
B) 7 10
C) 9 8
D) 8 9
3. What is the result?
boolean log3 = ( 5.0 != 6.0) && ( 4 != 5);
boolean log4 = (4 != 4) || (4 == 4);
System.out.println("log3:"+ log3 + \nlog4" + log4);
A) log3:false
log4:false
B) log3:true
log4:true
C) log3:true
log4:false
D) log3:false
log4:true
4. Given:
Which statement is true about the Fox class?
A) Fox class must provide implementation for the inhabit method.
B) Fox class does not have to override inhabit method, so long as it does not try to call it.
C) The inhabit method implementation from the first interface that Fox implements will take precedence.
D) Fox class does not have to override the inhabit method if Forest and Town provide compatible implementations.
E) Fox class must implement either Forest or Town interfaces, but not both.
5. Which three initialization statements are correct? (Choose three.)
A) byte b = 10;
char c = b;
B) int x = 12_34;
C) float x = 1.99;
D) boolean true = (4 == 4);
E) int[][] e = {{1,1},{2,2}};
F) short sh = (short)`A';
G) String contact# = "(+2) (999) (232)";
질문과 대답:
질문 # 1 정답: B | 질문 # 2 정답: A | 질문 # 3 정답: B | 질문 # 4 정답: D | 질문 # 5 정답: B,C,E |