Syntax
Classes
interfaces
Data Encapsulation
Java Collections Framework
100
What is happening in this code snippet: double d; (int)d = 9;
What is type casting.
100
This is how you create a class.
What is: public class doSomething() { }
100
This is how you declare an interface.
What is: public interface myInterface() { }
100
This is the keyword that allows anyone to access a method in a different class.
What is public?
100
This is an object that represents a group of objects.
What is a collection?
200
The difference between Integer and int.
What is Integer is a class type while int is a primitive type.
200
This constitutes that a class must be abstract.
What is the class contains an abstract method.
200
This is how many interfaces you can implement at one time.
What is as many as you want?
200
These are the four levels of privacy.
What are public, private, protected, and default?
200
This is the root interface of the collection hierarchy.
What is the Collection interface?
300
This is how you would initialize a scanner.
What is Scanner in = new Scanner(System.in);
300
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.
What is the Iterable interface?
M
e
n
u