Oracle (1Z0-808) Exam Questions And Answers page 3
What is the expected result of the given scenario?
Single Choice
Given:
What is the result?
What is the result?
True false
Compilation fails
A NullPointerException is thrown at runtime
Using Operators and Decision Constructs
Working with Methods and Encapsulation
What is the expected result of the given scenario?
Single Choice
Given:
What is the result?
What is the result?
400 200
200 200
400 400
Compilation fails.
Using Operators and Decision Constructs
Working with Methods and Encapsulation
What is the expected result of the given scenario?
Single Choice
Given:
What is the result?
What is the result?
int main 1
Object main 1
String main 1
Compilation fails
An exception is thrown at runtime
Using Operators and Decision Constructs
Working with Methods and Encapsulation
What is the expected result of the given scenario?
Single Choice
Given:
What is the result?
What is the result?
true:true
true:false
false:true
false:false
Using Operators and Decision Constructs
Working with Methods and Encapsulation
What is the expected result of the given scenario?
Single Choice
Given:
What is the result?
What is the result?
myStr: 9009, myNum: 9009
myStr: 7007, myNum: 7007
myStr: 7007, myNum: 9009
Compilation fails
Using Operators and Decision Constructs
Working with Methods and Encapsulation
What is the expected result of the given scenario?
Single Choice
Given:
What is the result?
What is the result?
Base
DerivedA
DerivedA
Base
DerivedB
DerivedB
DerivedB
DerivedB
DerivedB
DerivedB
DerivedA
DerivedA
A ClassCastException is thrown at runtime.
Using Operators and Decision Constructs
Working with Methods and Encapsulation
What is the expected result of the given scenario?
Single Choice
Given:
What is the result?
What is the result?
Compilation fails.
false true
true false
true true
false false
Using Operators and Decision Constructs
Working with Methods and Encapsulation
What is the expected result of the given scenario?
Single Choice
Given:
What is the result?
What is the result?
3 4 5 6
3 4 3 6
5 4 5 6
3 6 5 6
Using Operators and Decision Constructs
Working with Methods and Encapsulation
What is the expected result of the given scenario?
Single Choice
Given:
What is the result?
What is the result?
Compilation fails.
3 5
0 0
9 25
Using Operators and Decision Constructs
Working with Methods and Encapsulation
What is the expected result of the given scenario?
Single Choice
Given:
What is the result?
What is the result?
Base
DerivedA
DerivedA
Base
DerivedB
DerivedB
DerivedB
DerivedB
DerivedB
DerivedB
DerivedA
DerivedA
A ClassCastException is thrown at runtime.
Using Operators and Decision Constructs
Working with Methods and Encapsulation
Comments