Java Terms Exam 2025 Questions
and Answers
class - ANSWER✔✔-a template for an object, containing all the variables and methods
each object gets when instantiated.
object/instance - ANSWER✔✔-used to get the program to do what you want, using the
variables and methods defined in the class.
method - ANSWER✔✔-Java's term for a function or command - they are a set of
instructions.
instantiation - ANSWER✔✔-creating a new object from a class by calling one of the
constructors in that class
instance variable - ANSWER✔✔-a variable that's defined outside the methods of a class,
so it's available to all methods in that class (if it's public, all classes in the project)
constructor - ANSWER✔✔-a declaration in a Java class that instantiates an object
default constructor - ANSWER✔✔-a constructor with no parameters
, parameters - ANSWER✔✔-variables you put inside the parentheses of a method,
separated by commas, to indicate what data you'd like to pass to that method
cast - ANSWER✔✔-to convert one data type into another by putting the desired type in
parentheses in front of the original
scope - ANSWER✔✔-the range of access a variable has within a project
encapsulation - ANSWER✔✔-keeping instance variables private but writing public
methods to access them
accessor methods (getters) - ANSWER✔✔-these are used to return the value of a
variable (usually private) to the method that calls it (or to the console).
modifier methods (setters) - ANSWER✔✔-these are used to set or change the value of a
variable (usually private) in the object
modulus - ANSWER✔✔-an arithmetic operation, indicated by the % sign, that outputs
the remainder of a division
boolean - ANSWER✔✔-a primitive data type that stores one of two possible values: true
or false
conditional - ANSWER✔✔-a boolean expression, often used in loops and if statements
break - ANSWER✔✔-a statement that causes Java to exit the current loop and continue
with the next line of the program
and Answers
class - ANSWER✔✔-a template for an object, containing all the variables and methods
each object gets when instantiated.
object/instance - ANSWER✔✔-used to get the program to do what you want, using the
variables and methods defined in the class.
method - ANSWER✔✔-Java's term for a function or command - they are a set of
instructions.
instantiation - ANSWER✔✔-creating a new object from a class by calling one of the
constructors in that class
instance variable - ANSWER✔✔-a variable that's defined outside the methods of a class,
so it's available to all methods in that class (if it's public, all classes in the project)
constructor - ANSWER✔✔-a declaration in a Java class that instantiates an object
default constructor - ANSWER✔✔-a constructor with no parameters
, parameters - ANSWER✔✔-variables you put inside the parentheses of a method,
separated by commas, to indicate what data you'd like to pass to that method
cast - ANSWER✔✔-to convert one data type into another by putting the desired type in
parentheses in front of the original
scope - ANSWER✔✔-the range of access a variable has within a project
encapsulation - ANSWER✔✔-keeping instance variables private but writing public
methods to access them
accessor methods (getters) - ANSWER✔✔-these are used to return the value of a
variable (usually private) to the method that calls it (or to the console).
modifier methods (setters) - ANSWER✔✔-these are used to set or change the value of a
variable (usually private) in the object
modulus - ANSWER✔✔-an arithmetic operation, indicated by the % sign, that outputs
the remainder of a division
boolean - ANSWER✔✔-a primitive data type that stores one of two possible values: true
or false
conditional - ANSWER✔✔-a boolean expression, often used in loops and if statements
break - ANSWER✔✔-a statement that causes Java to exit the current loop and continue
with the next line of the program