In Java, polymorphism is implemented using late binding. True False QUESTION 2 A subclass cannot dir

In Java, polymorphism is implemented using late binding. True False QUESTION 2 A subclass cannot directly access public members of asuperclass. True False QUESTION 3 GUI components are placed in a window called JFrame. True False QUESTION 4 A polymorphic reference variable can refer to either an objectof their own class or an object of the subclasses inherited fromits class. True False QUESTION 5 You can instantiate an object of an abstract class. True False QUESTION 6 A subclass can directly access protected members of asuperclass. True False QUESTION 7 Suppose that the class Mystery is derived from the class Secret.Consider the following statements: Secret secRef;
Mystery mysRef = new Mystery();
secRef = mysRef; The value of the expression secRef instanceof Secret is true. True False QUESTION 8 Inheritance lets you create new classes from existingclasses. True False QUESTION 9 An interface is a class that contains only abstract methodsand/or named constants. True False QUESTION 10 When we instantiate a subclass object, this object inherits theinstance variables of the superclass, but the subclass objectcannot directly access the private instance variables of thesuperclass. True False QUESTION 11 In dynamic binding the method that gets executed is determinedat the compile time not at execution time. On the other hand, inrun-time binding the method that gets executed is determined atexecution time not at compile time. True False QUESTION 12 A subclass inherits all its data members from the superclass; ithas none of its own. True False QUESTION 13 Java uses late binding for methods that are private but not formethods that are marked final. True False QUESTION 14 Using the mechanism of inheritance, every public member of theclass Object can be overridden and/or invoked by every object ofany class type. True False QUESTION 15 In Java, a reference variable of a superclass type cannot pointto an object of its subclass. True False QUESTION 16 An abstract class can only contain abstract methods. True False QUESTION 17 The class Object is directly or indirectly the superclass ofevery class in Java. True False QUESTION 18 In Java, you can automatically make a reference variable of asubclass type point to an object of its superclass. True False QUESTION 19 A subclass can have its own private data members, but a subclasscannot have its own constructors. True False QUESTION 20 Suppose that the class Mystery is derived from the class Secret.The following statements are legal in Java. Secret secRef;
Mystery mysRef = new Mystery();
secRef = mysRef; True False QUESTION 21 Redefining a method of a superclass is also known as overloadinga method. True False QUESTION 22 The subclass can override public methods of a superclass. True False QUESTION 23 Composition is a ‘‘is-a’’ relation. True False QUESTION 24 The superclass inherits all its properties from thesubclass. True False QUESTION 25 An abstract method is a method that has only the heading with nobody. True False QUESTION 26 Every Java class (built-in or user-defined) automaticallyincludes the method toString. True False QUESTION 27 Composition is a “has-a” relation. True False QUESTION 28 To override a public method of a superclass in a subclass, thecorresponding method in the subclass must have the same name but adifferent number of parameters. True False QUESTION 29 You can instantiate an object of a subclass of an abstractclass, but only if the subclass gives the definitions of all theabstract methods of the superclass. True False Inheritance implies an “is-a” relationship. True False QUESTION 31 The private members of a superclass can be accessed by asubclass. True False QUESTION 32 In Java, extends is a reserved word. True False QUESTION 33 A call to the default constructor of a superclass must be thefirst statement in a constructor. True False QUESTION 34 Inheritance implies an ‘‘has-a’’ relationship. True False . . .

Expert's Answer

Need Urgent Academic Assistance?

Get Professional Help at Low Prices!

*
*
*


*

TOP
Order Notification

[variable_1] from [variable_2] has just ordered [variable_3] Assignment [amount] minutes ago.