Java Questions 10. What is the keyword used to call another constructor in the s
ID: 3719080 • Letter: J
Question
Java Questions
10. What is the keyword used to call another constructor in the same class?
11. What is the keyword used to call a constructor from the class's superclass?
14. Which of the following is the correct expression that evaluates to true if the number x is between 1 and 100 (not inclusive) OR a multiple of 3?
a. ((x < 100) && (x > 1)) || (x % 3 == 0)
b. 1 < x < 100 && x % 3 == 0
c. ((x < 100) && (x > 1)) && (x / 3 == 0)
d. x > 1 && x < 100 && x % 3 == 0
15. Which class contains a method to deserialize an object?
a. FileOutputStream
b. FileInputStream
c. ObjectOutputStream
d. ObjectInputStream
e. File
16. Which of the following statements about arrays is true?
a. An array is considered to be a primitive-type object
b. An array is considered to be a reference-type object
c. An array of primitives is considered to be primitive, and an array of references is considered to be a reference
17. TRUE OR FALSE: A class's static attributes may be accessed before any objects of the class are created.
Explanation / Answer
10. We can use 'this' keyword to refer to constructor in the same class
11. 'super' is used to call a constructor from superclass
14. (x>1 && x<100) || (x%3==0) Ans is (a)
15. ObjectOutputStream deserializes an object (c)
16. boolean, byte, char, short, int, long, float and double are primitve types.
b. An array is considered to be reference-type object
17. True. Static attributes belong to class. So, they can be accessed even before any object is created.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.