Oracle 1Z0-808 - Questions & Answers
Free preview · every answer includes a full explanation
Product page: https://prepkeys.com/1z0-808.html
Given the code fragment:

What is the result?
Given:

What is the result?
Which three are advantages of the Java exception mechanism?
Given the code fragment:

What is the result?
Given:
class Mid {
public int findMid(int n1, int n2) {
return (n1 + n2) / 2;
}
}
public class Calc extends Mid {
public static void main(String[] args) {
int n1 = 22, n2 = 2;
// insert code here
System.out.print(n3);
}
}
Which two code fragments, when inserted at // insert code here, enable the code to compile and print 12?
Given the code fragment:

Assume that the system date is June 20, 2014.
What is the result?

Given the code fragment:

What is the result?
Given the code fragment:

What is the result?
Given the code fragment:

And given the requirements:
If the value of the qty variable is greater than or equal to 90, discount = 0.5 If the value of the qty variable is between 80 and 90, discount = 0.2
Which two code fragments can be independently placed at line n1 to meet the requirements?

Given:

The class is poorly encapsulated. You need to change the circle class to compute and return the area instead.
Which two modifications are necessary to ensure that the class is being properly encapsulated?