TRUE OR FALSE 1.The binary search algorithm will work properly on all integer ar
ID: 3587878 • Letter: T
Question
TRUE OR FALSE
1.The binary search algorithm will work properly on all integer arrays.
2.A variable declared as static cannot ever be modified, once it has been declared and initialized.
3.Code that does not explicitly handle checked exceptions, results in a compilation error.
4.If a class C is declared as abstract, then private C myC = new C(); is valid.
5.If X is any valid, defined java object, then Object tmp=X; is a valid statement.
6.An instance variable declared as private can be seen only by the class in which it was declared and all its sub classes
7.int i = Math.sqrt(4.0); is a valid statement.
8.Boolean primitive variables can only be assigned values: true, false, or null.
Explanation / Answer
Solution:
1.
The statement” The binary search algorithm will work properly on all integer arrays.” False.
2.
The statement” A variable declared as static cannot ever be modified, once it has been declared and initialized.” is False.
3.
The statement “Code that does not explicitly handle checked exceptions, results in a compilation error.” is True.
4
The statement “If a class C is declared as abstract, then private C myC = new C(); is valid” is False.
5.
The statement “If X is any valid, defined java object, then Object tmp=X; is a valid statement.” is True.
6.
The statement “An instance variable declared as private can be seen only by the class in which it was declared and all its sub classes” is False.
7.
The statement “int i = Math.sqrt(4.0); is a valid statement.” is False.
8.
The statement” Boolean primitive variables can only be assigned values: true, false, or null.” is false.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.