What is the entry point of a Java program?
main method:
public static void main(String args[])
Name a primitive data type for whole numbers?
int
How do you create a method that returns an int?
public int methodName(){ }
What keyword is used for inheritance?
extends
parenthesis
How do you declare a class in Java?
public class ClassName{ }
How do you declare a double variable named price with a value of 19.99?
double price = 19.99;
How do you write a parameterized and a non-parameterized constructor?
public ClassName (datatype Data){ }
public ClassName () { }
What is a keyword that refers to the instance variables instead of the local variables.
this
{ }
Curly Braces/Brackets
What keyword is used to create an object?
new
What is the default value of a boolean variable?
false
What is method overloading?
Multiple methods with the same name but different parameters
What key word refers to the superclass?
super
\
Backslash
What is the file extension for a Java source file?
.java
Name four data types
boolean, int, String, double
What is an accessor method?
Prints the value of a variable
What is a keyword that doesn't return a value?
void
\n
New Line
What is the purpose of the public keyword?
To make the class accessible from other classes
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
What is a mutator method?
Assigns a new value to a declared variable
5 + (11 % 2) != 3 * 2 - 1
true
\"
double quote