
Getting ready for Java test 3
Authored by Paul Corey
Other, Mathematics
2nd Grade
Used 8+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Whenever an Interface is implemented by a subclass
All abstract methods in the interface must be implemented in the super class
All methods in the subclass must use @override notation before each method
All abstract methods in the interface must be implemented in the sub class
All methods in the subclass must use @Override notation before each method
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the Comparator class
To sort a collection in ascending order
To sort a collection in descending order
To sort the collection in the ascending order of the state variable which is unique within that class
To allow a collection to be sorted in different ways depending on the Comparator used
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Java Interfaces
Allows the behaviour of multiple class types to be implemented
Merges a subclass with the parental class
Provides a means of communications between Classes
Allows a class to not inherit from The Object class
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The Comparable interface has one abstract method which needs to be implemented. The method is
comparetoo(Object o)
compareToo(Object o)
compareto(Object o)
compareTo(Object o)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the return type of the compareTo method
int
String
ArrayList
Same type as objects being compared
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is returned when using compareTo where this object is less that the parameter object
Zero
Positive
Negative
Parameter object
This Object
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What word has been left out of the following statement:
java.util. .sort(list);
Collection
collection
collections
Collections
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?