Keywords
UML Diagrams
Miscellaneous
Objects & Methods
Code
100

Allows a method to return nothing. 

What is void?

100

The symbol that represents public visibility. 

What is +?

100

Keyword to immediately exit a loop. 

What is break?

100

Having two methods with the same name but different parameters.

What is method overloading?

100

Computer wants to use Device, which is an interface. Write the class header/declaration for Computer.

public class Computer implements Device {}

200

Refers to the current object inside a class.

What is this?

200

Used to indicate abstract methods. 

What is italics?

200

All classes inherit from this.

What is Object?

200
This type of method has the same name as the class.

What is a constructor?

200

Check if two string objects have the same value. 

What is stringA.equals(stringB)?

300

Defines a constant.

What is final?

300

This symbol represents protected visibility. 

What is #?

300

Symbol used to access fields/methods of an object.

What is .?

300

Method that usually returns a private field. 

What is an accessor?

300

for(int i = 0; i < 5; i++) 

    System.out.println(i)

The error is...

What is a missing semicolon?

400

Used to define a method/variable that belongs to the class, not the object. 

What is static?

400

Constructor notation. 

What is <<create>>?

400

This checks shallow equality.

What is ==?

400

Two methods with the same name, same parameters, but different classes. 

What is method overriding?

400

Declare an array of integers with size 5. 

int[] arr = new int[5];

500

A class state declared without an access modifier implies this state (and list the entities that have access to it in this case). 

Package protected
-> all instances of the class
-> classes in the same package

500

Used to indicate an inheritance (parent-child) relationship between two classes. 

What is a solid line with an empty triangle (child -> parent)

500

System.out.println(4 + 7 + "7"); 

What does it print?

477

500
Object method to override to determine what happens when you type: System.out.println(obj1); 

What is toString?

500

Write a method that adds up all the elements in an array and returns the sum. 

public int arrayTotal(int[] arr) {

    int sum = 0;

    for (int i = 0; i < arr.length; i++) {

        sum += arr[i];

    }

    return sum;

}