Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need help answering these questions. 2.4. In order for the following code to be correct, what must be the type of the reference variable
I need help answering these questions.
2.4. In order for the following code to be correct, what must be the type of the reference variable card? cad card-new Valentinel "Joe",14) card- new Holidayl Bob card-new Birthday mily, 12) ; (a) Valentine (b) Holiday (e) Birthday (f) Card 2.5. What is an advantage of polymorphism? (a) The same program logic can be used with objects of several related types. (b) Variables can be re-used in order to save memory (c) Constructing new objects from old objects of a similar type saves time. (d) Polymorphism is a dangerous aspect of inheritance and should be avoided. 2.6. What is an abstract class? (a) An abstract class is one without any child classes. (b) An abstract class is any parent class with more than one child class (c) An abstract class is a class which has at least one abstract method which cannot be (d) Is a "base class" 2.7. What are the benefits of "Comparator" over "Comparable"? (a) Enables using Collections.sort algorithms (b) Implemented in a separate class (c) Allows implementation of multiple natural ordering (d) None of above 2.8. What are the benefits of JavaFX', compared to "Swing"? (a) JavaFX includes chart features (b) JavaFX includes 3D features (c) It is faster to develop an GUI using JavaFX (d JavaFX supports multimedia natively (e) All of above 2.9. A thread can acquire a lock by using which reserved keyword? (a) volatile (b) synchronized (c) locked (d) None of above
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started