This is the difference between an abstract class and an interface. (In java 7)
What is abstract classes can have methods defined in them while interfaces cannot.
300
In java 7, this is the format of methods in an interface.
What is method signatures without any method body.
300
This protects your class from the world.
What is protected?
300
This is a collection with no duplicate elements.
What is a set?
400
The parameter an ArrayList takes must be one of these.
What is a class type.
400
This is the keyword you need to access the methods from a super class in a sub class.
What is super().
400
In Java 8, this is the keyword to allow method bodies to be written in an interface.
What is default?
400
This is the definition of polymorphism.
What is Two methods with the same signature but with different functionality.
400
This type of collection does not inherit the collections interface.
What is a Map?
500
This is an example of what:
public class ArrayList {
What is a generic?
500
This is an example of what:
public class PersonA {
Person p = new Person() {
public void doThis() {
System.out.println("Doing this");
}
public void doThat() {
System.out.println("Doing that");
}
}
}
What is an Anonymous class
500
When implementing an interface these methods must be defined in the class that implements it.
What is all of them?
500
This is the reason for data encapsulation.
What is to conceal specific information about a program's implementation from the outside world.
500
This is the overarching interface for all parts of the collection framework. Every collection must implement this.