Question: TRUE OR FALSE: (List a small explaination as to why it is true or false) 1. Just as arrays can only have a fixed number

TRUE OR FALSE: (List a small explaination as to why it is true or false)

1. Just as arrays can only have a fixed number of elements, set at the time the array is declared, a parameter list also can only have a fixed number of elements, set at the time the method is declared.

2. Any class can implement an interface, but no classes can implement more than a single interface.

3. An item of type ProduceItem may be added to an ArrayList of type ArrayList.

4. The Java virtual machine (JVM) automatically performs runtime polymorphism to determine the correct method to call.

5. A class having an abstract method implies that objects of that class type cannot be defined.

6. A class defined as "abstract" must contain an abstract method.

7. Implementing an interface means that you are adding to your class any mechanisms defined in an abstract class. Your class essentially is expanded to contain those items defined in the interface class but you have to implement any of those items that are abstract. The appeal is that other objects might call upon your class to use the interface methods without knowing anything else about your class. The derived class is similar in that you are gaining items previously defined, although in this case, those items are defined in the parent class (as long as those items are protected or public) and you do not have to implement any of them unless you want to redefine them. One difference between the two is that the interface cannot be instantiated directly. Another difference is that your class "inherits" abstract methods from the interface class as opposed to implemented methods from a super class. Are all these statements TRUE or FALSE?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!