Java Programming :: Java.lang Class
-
Which statement is true given the following?
Double d = Math.random();
-
Which two statements are true about wrapper or String classes?
- If x and y refer to instances of different wrapper classes, then the fragment x.equals(y) will cause a compiler failure.
- If x and y refer to instances of different wrapper classes, then x == y can sometimes be true.
- If x and y are String references and if x.equals(y) is true, then x == y is true.
- If x, y, and z refer to instances of wrapper classes and x.equals(y) is true, and y.equals(z) is true, then z.equals(x) will always be true.
- If x and y are String references and x == y is true, then y.equals(x) will be true.
-
Which of the following will produce an answer that is closest in value to a double, d, while not being greater than d?
-
What two statements are true about the result obtained from calling Math.random()?
- The result is less than 0.0.
- The result is greater than or equal to 0.0..
- The result is less than 1.0.
- The result is greater than 1.0.
- The result is greater than or equal to 1.0.