Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A subclass can change a protected data in superclass to be public. When a class

ID: 3582962 • Letter: A

Question

A subclass can change a protected data in superclass to be public. When a class extends another class it also inherits private members including fields and methods. An interface may contain constructors. Every recursive method must have a base case or a stopping condition. The seek method in RandomAccessFile class can move the file-pointer forward and backward. A source code file may contain several public classes. A protected method can be accessed by a subclass in a different package. A final class can be extended. You can use the operator to check the equality of contents of the two objects. You can NOT create an instance of an abstract class using the new operator. All methods in an interface are abstract. Unix command "Is-l test.txt" can remove the file test.txt.

Explanation / Answer

Section1:

1)Ans) true

2)Ans)false

Reason:Private members of a class cannot be accessed by any other class.They only accessed by the class memeber methods in which they have beed declared.

3)Ans)false

4)Ans)True

5)Ans)False

6)Ans)false

7)Ans)true

8)Ans)false

9)Ans)false

If we want to compare the contents we have to use equals() method.

10)Ans)true

We cannot create an instance of an abstract class.As it didnt have the complete class implementation.

11)Ans)true

12)Ans)false

Section 2:

1)Ans)B

2)Ans)B

3)Ans)A

4)Ans)C

5)Ans)d

6)Ans)B

7)Ans)C

8)Ans)B

9)Ans)C

10Ans)A

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote