A constructor will always have the same name as the class in

A constructor will always have the same name as the class in which it is loaded. If a method is declared without an access modifier, then assuming it is public class its visibility is limited to (a) class b) package c) project d) subclasses e) it can be done methods must have an access modifier The second compartment of a UML class diagram may be omitted if the fields of that class are private. subclasses do not inherit constructors from their superclass. which one of the following is true of an abstract class (a) It cannot contain static method (b) All its method become abstract (c) It cannot be instantiated (d) It does not have access to the object class method (e) None When property is declared as final its value must be assigned at the point of declaration since a value cannot be assigned afterward. @Override method is mandatory to recognize that the subclass extends the super class methods.

Solution

9) True

10) option e , a method must have an access modifier

11) false , private members also need to be mentioned

12) true, super constructors can be called from subclass using super() keyword

13) option c , it cannot be instantiated

14) true , final variable has constant value

15) false , its not manadatory

 A constructor will always have the same name as the class in which it is loaded. If a method is declared without an access modifier, then assuming it is public

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site