Question: check my answears please: In Java an array can only store one type of data. TRUE 2 . An array index cannot be a float,

check my answears please:
In Java an array can only store one type of data. TRUE
2. An array index cannot be a float, double, boolean, or String. TRUE
3. A Java main method uses the parameter (String[] variable) so that a user can run the program and supply command-line parameters. Since the parameter is a String array, however, the user does not have to supply any parameters. TRUE
4. Interface classes cannot be extended but classes that implement interfaces can be extended. FALSE
5. A derived class has access to all of the methods of the parent class, but only to the protected or public instance data of the parent class. FALSE
6. Consider the following class hierarchy:
A is a derived class of X? FALSE
7. Y is a derived class of Z? FALSE
8. If A, B, Y and Z all contain the same instance data d1, then d1 should be declared in X and inherited into Y, Z, A and B. TRUE
9. The reserved word, extends, is used to denote a has-a relationship. FALSE
10. You may use the super reserved word to access a parent class's private members. FALSE
11. Java doesn't support multiple inheritance; but it does support the implementation of multiple interfaces. TRUE
12. To swap the 3rd and 4th elements in the int array values, you would do: FALSE
values[3]= values[4];
values[4]= values[3];
13. A polymorphic reference can refer to different types of objects over time. TRUE
14. Java allows one to create polymorphic references using inheritance and using interfaces TRUE
15. A reference variable can refer to any object created from any class related to it by inheritance. TRUE
16. The fact that the System.out.println() method is able to handle such a wide variety of objects, and print them correctly, is an example of the polymorphic nature of the println() method. TRUE
17. An interface reference can refer to any object of any class that implements the interface. TRUE
18. An class reference can refer to any object of any class that descends from the class. TRUE
19. A method's parameter can be polymorphic, giving the method flexible control of its arguments. TRUE
20. One of the advantages of the linear search is that it does not require its data to be sorted. TRUE

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 Programming Questions!