Rounds the value of a double to the nearest whole number.
A class, usually at the top of a Class Hierarchy, that cannot be instantiated, because not all of its methods are defined.
A method, written in an Abstract Class, that is not defined. The word abstract
must come right before the method's return type. It is up to the subclass to fill in the definition for the abstract method.
A method that enables user to obtain information about an object’s instance and static variables. Also referred to as getter methods.
To update the variable's value.
An object’s characteristics (Instance Variables).
The behavior of an object is what the object is able to do. It is the actions that can be performed by the object.
Boolean
A Java primitive type that can either be true or false
Breaks out of a while loop and executes statements that immediately follow while loop.
objectName.method() - Calling a method actually gives the command, so the computer will run the code for that method.
Turning something of one type into another type.
A Java type that represents a single character (a single letter)
Class
A class is a template, or a blueprint, from which Java objects are created. All Java programs start with a class.
Class Hierarchy
Class Hierarchy refers to the arrangement of classes and how they relate to each other.
Client
When someone else creates a Class (like String
, or Randomizer
), and you are using the functionality of that Class in your program, your program is a client of the class. You are using the class as a client.
An error in the actual Java code. The code will not compile into an executable program, because there are errors in the text of the code.
The process of adding two String values together. This creates a new String object. Primitives can be concatenated with String objects.
A constructor is a special method of a Class that constructs a new object (a new instance) of the Class and sets the initial values for the instance variables.
Declaring a variable is defining it for the first time.
Defining a Method
To teach the computer a new command and explain what it should do when receiving that command.
Double
A Java type that represents a real number with decimal values
The process of hiding the implementation details of a class from the user
Exception
An exception is thrown by Java when a runtime error is encountered. The exception provides information about what kind of error occurred.
For Loop
A for loop lets us repeat code a fixed number of times.
Getter Method
An instance method that allows the client to get the value of an instance variable on an object.
Executes code only if condition is true
Immutable
Unable to be changed or manipulated. String are immutable.
Inheritance
When a subclass extends a superclass, the subclass inherits all of the static methods, static variables, and public instance methods of the superclass. This is called inheritance.
Initializing a Variable
Initializing a variable is giving it an initial value.
Instance
A created object with defined attributes.
Instance method
An instance method is a method that defines the behavior of an object. It defines an action that the object can perform.
Instance Variable
A variable defined in a Class, for which each object of the class has its own copy.
Local Variable
A variable that is defined in a method or constructor. It only exists in the context of the method that it belongs to.
Loop and a half
A loop, most often set with while(true), that has a break in the loop body.
Method
Procedures that allow us to control and define the behavior of an object.
Method Overloading
Methods can have multiple signatures. Java will use the correct signature based on the actual parameters used in a program.
Method Overriding
If a subclass defines a new method body for a method defined in the superclass, then the subclass has overridden the method of the superclass.
A method that enables user to change the value of an object’s instance and static variables.
Necessary keyword for instantiating a new class object.
Object
An object is a variable of a data type that is user defined. Every object has a state and a behavior.
Object Oriented Programming
Programming model that focuses on objects and the data and actions associated with the objects.
Parameter
A variable passed into a method from outside the method.
Polymorphism
An object can take on different forms depending on its implementation. Java can call the correct method even when an object is disguised as a more generic reference type
Primitive types are the basic, simple data types that are inherent to Java (int, double, char, and boolean)
Public
Allows access to data and methods from classes outside the declaring class.
Return
Keyword used in methods to return a value back to the initial program that called the method.
Return Type
Indicates what type value is being returned from the method
Return Value
The value that is returned from a method.
Scope
In what part of the program the variable exits
Sentinal
A constant that has the specific purpose of being the value that breaks out of a loop.
Setter Method
An instance method that allows the client to set the value of an instance variable on an object.
Shadowing
If two variables within the same scope have the same name, the variable with the more specific scope will be called.
State
The data that is associated with an object or class.
Static Method
A method called on the Class, rather than on a specific object of the Class.
Static Variable
A variable or attribute of a class that is shared between all instance of a class. Each instance does not get their own copy.
String
A sequence of characters
Subclass
A child class that inherits attributes and behaviors from a superclass (parent).
Super
The super keyword lets us reference the superclass when writing code inside of a subclass.
Superclass
A parent class that contains common attributes and behaviors used by subclasses (children).
this
Refers to the current object
toString
toString is a special method you write in your class that returns a String representation of the object.
Variable
A symbol or container that holds a value.