Given:
What is the result?
A
Which two Java reserved words are used to implement encapsulation?
C, E
Explanation:
Reference: https://learn.saylor.org/mod/page/view.php?id=22044
Given the code fragment:
Which code fragment can be inserted at line n1 to enable the code to print 0.0?
A.
Ball b = null;
b.weight = 0.0;
B.
Ball.weight = 0.0;
C.
Ball b = new Ball(0.0);
D.
Ball b = new Ball();
D
Which two statements are true about the Java Runtime Environment (JRE)?
B, D
Explanation:
Reference: https://en.wikipedia.org/wiki/Java_virtual_machine
Identify two features of Java.
B, D
Explanation:
Reference: https://www.javatpoint.com/features-of-java
Given:
What is the result?
D
Given the code fragment:
What is the result?
A.
A compilation error occurs.
B.
A runtime exception is thrown.
C.
Julia
Peter
D.
Peter
Julia
C
Given the code fragment:
Which code fragment can be inserted at line n1 to enable the code to compile?
B
Given the code fragment:
What is the result?
A.
B.
C.
D.
B
Given the code fragment:
What is the result?
A.
Unknown issues.
Invalid divisor.
B.
Unknown issues.
C.
Invalid divisor.
D.
A compilation error occurs.
D