Basic Structure
Variables and Data Types
Methods
Object-Oriented Concepts
Keyboard Characters
100

What is the entry point of a Java program?

main method: 

public static void main(String args[])

100

Name a primitive data type for whole numbers?

int

100

How do you create a method that returns an int?

public int methodName(){ }

100

What keyword is used for inheritance?

extends

100
( )

parenthesis

200

How do you declare a class in Java?

public class ClassName{ }

200

How do you declare a double variable named price with a value of 19.99?

double price = 19.99;

200

How do you write a parameterized and a non-parameterized constructor?

public ClassName (datatype Data){ }


public ClassName () { }

200

What is a keyword that refers to the instance variables instead of the local variables.

this

200

{ }

Curly Braces/Brackets

300

What keyword is used to create an object?

new

300

What is the default value of a boolean variable?

false

300

What is method overloading?

Multiple methods with the same name but different parameters

300

What key word refers to the superclass?

super

300

\

Backslash

400

What is the file extension for a Java source file?

.java

400

Name four data types

boolean, int, String, double

400

What is an accessor method?

Prints the value of a variable

400

What is a keyword that doesn't return a value?

void

400

\n

New Line

500

What is the purpose of the public keyword?

To make the class accessible from other classes

500

Name the appropriate data type

1. "Blue Sea"

2. 32

3. "true"

4. 3.3

5. false

1. String

2. int

3. String

4.double

5. boolean

500

What is a mutator method?

Assigns a new value to a declared variable

500

5 + (11 % 2) != 3 * 2 - 1

true

500

\"

double quote

M
e
n
u