Question & Answer: 11. Setters are void return type methods. True OFalse 12. To make fields directly accessible to other classes, th…..

11. Setters are void return type methods. True OFalse 12. To make fields directly accessible to other classes, the class fields must be marked public. O True O False 13. Static variables of a class can be accessed, even if the class has not been instantiated (0) True O False

11. Setters are void return type methods. True OFalse 12. To make fields directly accessible to other classes, the class fields must be marked public. O True O False 13. Static variables of a class can be accessed, even if the class has not been instantiated (0) True O False

Expert Answer

 

11) True

Setter methods in OO will return void type.

12) True

If protected, then only accessible to subclasses with in the package.

If private, accessible to only with in the class

If public, accessible to other classes

13) True

Static variables of a class can be accessed, even the class has not been instantiated.

14) B

Non static variables can’t accessible from static method.

If static method access the non static variable, then it will it’s default values.

If it is int, it will print 0

If it is string, it will print NULL

15) True

Reference variables are used to refer an object.

Once they declared in specific type, then they cannot be changed

Still stressed from student homework?
Get quality assistance from academic writers!