IT 114: Introduction to Java
Definitions

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  V  W  X  Y  Z 

A

Absolute Path
The list of directories, starting with the root, that leads to the directory holding a specific file.

Accessor
A method that returns the value of a hidden attribute.

Algorithm
A step-by-step description of how to accomplish a task.

Array
A data structure consisting of a number of elements, each of the same type, where any individual element can be accessed by a number indicating its position in the array.

Argument
A value that appears inside the parentheses of a method call.

Array Traversal
Processing each array element in an array in order, from the first to the last.

Assignment
Giving a value to a variable.

Assignment Statement
A statement that gives a value to a variable. It has the form
VARIABLE_NAME = VALUE


Assignment Operator
This operator takes the value of the expression to its right and assigns it to the variable whose name is on its left. In Java the assignment operator is =.

Attribute
The values contained in a class or object.

Auto-Initialization
The automatic initialization of variables to a default value, such as on an array’s elements when it is constructed.

Augmented Assignment Operator
An operator that performs some arithmetic operation on the value of a variable, and assigns this new value to the variable. The Java augmented assignment operators are

B

Base Class
Another term for superclass.

Binary Number
A number written base 2, powers of 2. Each digit in a binary number can only have the values 0 or 1.

Binary Digit
The digits 0 or 1 that form a binary number.

Bit
Hardware that represents a single binary_digit.

Boolean
A primitive data type whose value can only be true or false.

Boot Process
The series of steps which bring all the software needed to run the machine in the computers RAM and all essential services are started.

Boolean Expression
An expression that yields either true or false when evaluated.

Byte
Eight binary digits. The number stored in each byte can be represented as an octal number.

Bytecodes
Numbers that represent commands inside the Java interpreter, java.

C

Camel Case
A naming convention where more than one word is used in an identifier. Each new word is distinguished from the characters that come before it by being written in upper case, while all other characters are lower case

Case Sensitive
Some languages, like Java, and environments, like Unix, treat a the capital and lower case version of the same letter, for example  A  and  a , as different letters. These languages and environments are said to be case sensitive. If you use the wrong case in spelling a word, Java and Unix both treat this as a spelling error.

Cast
A Java construction that forces the conversion of one data type into another. You form a cast in Java by placing parentheses around the name of the data type you want, just before the value that needs to be converted.
int x =  (int) y * 2;
Catch an Exception
The act of intercepting an exception within a Java program, before it gets to the Java interpreter. Any exception that is not caught inside a program, will cause a runtime error.

Catch Block
The second code block in a try/catch statement. When the Java interpreter comes across a an exception inside the try block of a try/catch statement, it does not cause a runtime error. Instead, it stops executing the code in the try block and tries to find a catch block that looks for the particular type of exception that is thrown. Each catch block responds to a different type of exception. There can be many catch blocks, one for each type of exception. If there is no catch block for the exception that was thrown, a runtime error will occur.

Checked Exception
An exception that must be caught inside the method that causes the exception or must be declared in the method header.

Class
The code that specifies the values and methods an object contains. The class contains a special method called a constructor is used to create an object. Classes are the basic building blocks of Java programs.

Class Constant
A constant that is defined inside a class, but outside all class methods. Class constants can be used by all methods in the class.

Class Header
The first line of a class, which gives important information about the class including its name

Class Variable
Another name for an instance variable.

Code Block
A code block is a section of code that is surrounded by a matched pair of curly braces: { }

Command Line Argument
Words written on the command line that can be used by the program you are running. The args parameter of the main method provides command line arguments to any Java program,

Comment
Text that programmers include in a program to explain their code. The compiler ignores comments.

Compiler
A program that translates a computer program written in one language into an equivalent program in another language (often, but not always, translating from a high-level language into machine language).

Compound Statement
A statement that contains other statements inside it. A compound statement cannot be written on a single line.

Concatenate
Joining two strings to form a new string.

Console
A text only environment in which programs are run and can interact with the user.

Console Window
A special text-only window in which Java programs interact with the user.

Constructor
A method that creates and initializes an object.

Consuming Input
Moving the input cursor forward past some input.

Control Structure
A syntactic structure that controls how and when other statements are executed.

Control Variable
The variable that is used in a loop to keep track of the number of times the loop body has been executed so the loop knows when to stop.

Constant
A variable whose value is assigned once and cannot be changed.

Counter
A variable that keeps track of the number of times something has happened.

Convention
Ways of doing things that make life easier, but are not required. Using camel case in Java method names is a convention. If you do not follow this convention, your code will still work.

Cumulative Algorithm
An algorithm in which a value is computed bit-by-bit using some kind of loop. The final value is not known until the loop has finished.

Cumulative Concatenation
Building up a string by adding individual characters in a loop.

Current Directory
The directory where you can specify a file simply by its name, without using a path.

D

Data Hiding
The principle of hiding the internal details of a class from users of the class.

Data Structure
A specific arrangement of data in a computer program that allows the program to use the data efficiently for the task at hand.

Data Type
The name given to the type of value inside a Java program. Each data type is represented differently inside the computers memory. Integers (int) and characters (char) are examples of Java data types.

Data Validation
Checking that data meets certain requirements before using it. For example, Checking that a value is of the correct data type or that a number is not zero before using it to divide another number.

Declare
The act of defining something in the Java language.

Declaration
Defining something in the Java language.

Decomposition
Breaking down a big problem into smaller problems, each of which is easier to do.

Decrementing
Decreasing the value of a variable, usually by 1.

Default Value
A value that is supplied by Java when the program does not set a value. In Java, the elements of an array are given a default value, when the array is created.

Defensive Programming
An approach to programming that tries to anticipate problems before they happen and write code that handles these problems without crashing or corrupting the data.

Definite Loop
A loop which will execute a predetermined number of times.

Delimiter
Characters used to mark the boundaries between strings.

Derived Class
Another name for a .

Device Driver
Software created by the manufacturer of a device connected to a computer, such as a printer, that allows the kernel to get information from, or send information to, that device.

Directory
A place where files are kept in Unix. It is called a folder on Windows and the Mac.

Domain Name
A combination of the hostname and a network name. To connect to a machine on the Internet, you need to use a domain name.

Dot Notation
The format used when accessing an element from another or object. That element can be a method, a variable, or a constant. You first write the name of the class or object that holds the element, followed by a dot,  .  , followed by the name of the element
CLASS_OR_OBJECT_NAME.ELEMENT_NAME
Driver Class
A static class that contains a main method which starts the application or program.

Dummy Value
A value chosen to initialize a variable before it is used and to be so different from any possible valid value that it would be easily detected if inadvertently used.

E

Element
An individual entry, or value, in an array.

Empty String
The string with no characters in it: "".

Escape Sequence
A combination of two characters, one right after the other, that are used to represent special characters. They all begin with the backslash character,  \ . For example, the tab character is represented as "\t".

Evaluation
The process of obtaining the value of an expression.

Exception
A Java mechanism for dealing with a runtime error. An exception is produced by the Java interpreter, and gives you information that can help identify the cause of the runtime error.

Exception Object
An object created by the Python interpreter when a runtime error occurs that contains information about the type of exception and the line in the code that caused it.

Expression
Anything that Java can turn into a value. An expression can be a

F

Fencepost Problem
A problem involving class and the things that connect them, where all objects except the first and the last are connected to two other objects. There will always be one more objects than the number of connections in these situation. The classic example is a fence with wire running between two posts except for the first and last posts.

Field
The values contained in a class or object.

Field (of a Record)
An individual piece of information in a record.

File
A linear arrangement of data on a storage device for a computer. Every file has a name and a location.

Flag
A boolean variable that indicates a certain condition like whether a user is an adult. This variable is set early in the program and used in control structures farther down in the code.

Flow of Control
The order in which the statements of a Java program are executed.

Formal Parameter
The that appears inside the method, and is declared inside the method header

Format Specifiers
Placeholders for the values supplied by values following a format string. They consist of  %  followed by 1 or more characters.

Format String
A string used with the System.out.printf the printed output using special character combinations.

G

Getter
Another name for an accessor.

Graphical User Interface
A visual display on a computer screen using windows and graphical elements to better show the output of a program and get input from the user.

GUI
The abbreviation for a Graphical User Interface.

H

Hierarchical Filesystem
The way Unix organizes file. All files are kept in directories, which are called folders in Windows. Directories live inside other directories. There is one directory at the top which is called root but is represented as  / .

Home Directory
A directory that belongs to one, and only one, Unix account. The directory has the same name as your Unix username. When you fist connect to a Unix machine, you will be in your home directory. To get back to your home directory, use the cd command without any argument.

Hostname
The name of a computer on the network.

I

Indefinite Loop
A loop in which it is impossible to know how many iterations it will perform before it executes, because that number is determined as the loop executes.

Identifier
A name given to something in a program, such as a class, method, variable, or constant.

Index
An integer used to specify a location in a sequence of values. Java uses zero-based indexing, with 0 as the first index value. Indexes are used to get an individual character in a string or an element of an array

Interpreter
A program which takes a file with instruction in a language and directly executes each instruction in that file without creating an executable file.

Initialize
Giving a newly declared variable its first value

Incrementing
Increasing the value of a variable, usually by 1.

Infinite Loop
A loop that never ends.

Inheritance
The ability to form a new class using attributes and methods of another class.

Input Cursor
A pointer to the current position in an input file.

Interactive Program
A program that asks the user for input and waits until it receives it.

Immutable
Something that cannot be changed.

Implicit Parameter
The implicit parameter is the address in memory of the specific object the method belongs to. It is this parameter that gives a method access to the fields inside its own object.

import
The act of loading a Java package into the RAM of a running program.

Import Declaration
Code to make a specific Java package available to a program. It must appear outside a class declaration.

Iteration
A single execution of the code in the loop body,

Iterative Enhancement
The process of producing a program in stages, adding new functionality at each stage. A key feature of each iterative step is that you can test it to make sure that piece works before moving on. This technique is also called stepwise refinement.

Infinite Loop
A loop that never exits.

Instance
A single object created from a particular class.

Instance Method
A method that only works with the fields in its object.

Instance Variable
Another name for a field.

J

Jagged Arrays
Arrays in which the number of elements in each dimension of the array varies from one array to the next.

Java Class Libraries
The collection of preexisting Java code that provides solutions to common programming problems.

Java Runtime
A program that executes compiled Java bytecodes. The name of the executable file that contains this program is java.

Java Virtual Machine (JVM)
A theoretical computer whose machine language is the set of Java bytecodes. The Java Runtime
implements the Java Virtual Machine.
Kernel
The part of the that always remains in memory and control access to all hardware on the computer. Typically, the kernel is responsible for memory management, process and task management, and disk management.

K

Keyword
A word that Java reserves for its own use, because it has special meaning in Java. Keywords cannot be used as identifiers.

Kludge
An inelegant solution to a problem.

L

Lazy Evaluation
Another term for short-circuited evaluation.

Line-Based Processing
The practice of processing input line by line (i.e., reading in entire lines of input at a time).

Literal
A value that is explicitly written out, like 4, 5.07 or "Hello world!".

Literal Value
A value that is explicitly written out, like 4, 5.07 or "Hello world!".

Logic Error
An error that arises from code that does not perform the way it should.

Logical Operator
An operator that takes boolean values for its operands and returns a boolean result.

Local Variable
A variable declared inside the body of a method. They can only be used inside the method.

Localization
The principle that variables should be declared where they are used, and not in a higher scope.

Localizing Variables
Declaring variables in the innermost (most local) scope possible.

Loop Body
The series of statements that are run with each pass through the loop. The loop body must be enclosed in curly braces,  { } .

Loop Header
The first line of the loop that determines how many times the loop will run,

Loop Variable
See Control Variable.

M

Machine Language
A series of binary numbers that represent instructions that a computer can understand. Each different computer processor has its own machine language.

Magic Number
A term used by programmers to describe a number that makes the program work, but it is not obvious how this value was calculated.

Method
A collection of statements with a name that performs a specific task. Methods are only run when they are called. Most methods return a value. A method definition consists of a method header and a method body.

Method Body
A code block containing the statements that are run when a method is called.

Method Call
A Java statement that executes a method, which causes all of the statements inside that method to be executed.

Method Declaration
A Java statement that defines a method.

Method Header
The first line of a method, which specifies

Modulus Operator
See remainder operator.

Multidimensional Array
An array of arrays, the elements of which are accessed with multiple indexes.

Mutator
A method which changes the value of a hidden attribute.

N

Nested Loop
A loop whose loop body contains another loop.

Nested If Statement
An if statement whose code block contains another if statement.

Newline
A character that forces the output down to the next line. It is written using the \n Escape Sequence.

Null
A special value used in object variables that indicates that the variable points to nothing. null is a literal and serves the same function for pointers that 0 does for integers.

O

Object
A section of a computer's RAM that holds data about some thing, and the methods that act on that data. Unlike variables they can hold many values and do not have a name, just a position in RAM. This position must be stored in a variable so the objects can be used, Objects only exist when the program that creates them is running.

Object File
A file created by running the Java compiler on a file containing Java source code. This file consists of bytecodes which the Java interpreter, java, can execute directly.

Octal
A number that is represented as powers of 8 (base 8). Octal digits run from 0 to 7. An octal number is often used to represent the number stored in byte.

Operand
A value acted on by an operator in an expression.

Operator
Special characters that perform an action using one or more values. Usually that action result in a new value, for example addition, +, and multiplication, *. The values that the operator works upon are called operands.

Overloading
The ability to define two or more different methods with the same name but different method signatures.

P

Package
A collection of related Java classes.

Parameter
A local variable inside a method that gets its value from the argument in the method call.

Parameterize
To identify the set of parameters necessary for a method to accomplish its task.

Parsing
The act of breaking up a line of text or a file into tokens.

Path
The location of a file, specified by the list of the directories that you must go through to get to the file.

Path of Execution
The list of statements that are executed during the running of a program.

Pathname
The path to a file followed by the name of the file. The pathname uniquely specifies a file.

Polymorphism
A feature of inheritance that allows a subclass to define a method with the same name as a method in the superclass. When a subclass object is created and a method is called, the Java interpreter will always call the subclass version of the method when there is one.

Placeholder
A group of characters within a larger string that stands in place of a specific value which is added later.

Precedence
The rules that determine the order in which operators are used when evaluating an expression.

Priming the Loop
Initializing a variable used in the test condition for a loop before entering the loop.

Primitive Data Type
One of the two categories of data types in Java, the other being objects. A primitive data type can only hold one value.

Prompt
Text printed to output before waiting for input from the user that tells the user that input is expected. A good prompt will tell the user exactly what input is required.

Post-decrement Operator
The pre-increment operator,  --> , appears after the variable and means subtracting 1 from the value of a variable after it is evaluated.

Post-increment Operator
The post-increment operator,  ++ , appears after the variable and means adding 1 to the value of a variable after it is evaluated.

Precondition
A condition that must be true before a method executes in order to guarantee that the method can perform its task.

Pre-decrement Operator
The pre-increment operator,  --> , appears before the variable and means subtracting 1 from the value of a variable before it is evaluated.

Pre-increment Operator
The pre-increment operator,  ++ , appears before the variable and means adding 1 to the value of a variable before it is evaluated.

Process
A running program. Processes have resources, like memory and access to files. The memory for a process contains the binary code for the program.

Procedural Programming
A style of programming where the code is broken up into individual functions or methods.

Program
A list of instructions to be carried out by a computer.

Program Execution
The act of carrying out the instructions contained in a program.

Prompt
Text requesting input from the user.

Property
The values contained in a class or object.

Pseudocode
English-like descriptions of what the program needs to do. This text can be slowly translated into Java statements.

Pseudorandom Numbers
Numbers that, although they are derived from predictable and well-defined algorithms, mimic the properties of numbers chosen at random.

Pseudorandom Number Generator
Code that creates pseudorandom numbers.

Q

R

Raise an Exception
When a situation occurs that would cause a runtime error the Python interpreter creates an exception. When this happens, the interpreter is said to raise an exception.

Random Access
Accessing a series of values by selecting individual items without regard to their order.

Record
A record is a complete set of data about some event or thing. The individual pieces of information in a record are called fields.

Refactoring
The process of making small changes in a program, to make it easier to read and maintain, without changing how it works.

Reference Semantics
A system in which references to values are stored and copying is achieved by copying these references. Types that use reference semantics are called reference types.

Relational Operator
An operator that compares two values and evaluates to true or false.

Relative Path
The list of directories, starting with the current directory, that leads to the directory holding a specific file.

Remainder Operator
In Java,  %  is the remainder operator, which gives the remainder when one number is divided by another.

Result
The value obtained from evaluating an expression.

Returning a Value
Sending a value computed inside a method back to the statement that called the method. void methods do not return any value.

Return Type
The data type of the value by a method. The return type must be specified in the method header.

Roundoff Error
A numerical error that occurs when decimal numbers have more digits after the decimal point than can fit in the space that Java sets aside for a double variable.

Robust
The ability of a program to run properly even when presented with illegal data.

Runtime Error
A logic error that is so severe, that the Java interpreter stops your program from running.

S

Scope
The part of a program in which a particular identifier, that is the name of a variable, constant, method, or class can be used.

Sequential Access
Accessing the values in a list or array in a sequential manner, from first to last.

Sentinel
A special value that signals the end of input.

Setter
Another name for mutator.

Shell
A program which stands between the user and the operating system. The shell asks the kernel to run the command entered at the command line.

Signature
The name of a method, together with the data types of all its parameters. In Java the method signature does not include the return type of the method. Two methods with the same name and the same number of parameters have a different signature if the types of the parameters are different.

Source Code
A text file that contains statements written in a computer language.

SSH Protocol
A protocol that allow one computer to connect to a Unix machine on a network.

SSH Client
Software that uses the SSH protocol to allow a user on one machine to connect to a Unix machine. There are many ssh clients for Windows, but a good one is PuTTY. On a Mac you can use the Unix ssh utility.

Short-Circuited Evaluation
The property of the logical operators && and || that prevents the second operand from being evaluated if the overall result is obvious from the value of the first operand.

Simple Statement
A statement that can be written on a single line.

Subclass
A class which inherits the attributes and methods of another class. Also called a derived class.

Substring
A string contained within another string.

Superclass
A class whose attributes and methods are inherited by another class. A superclass is also called a base class.

Stack Trace
The list of methods that were called before a runtime error in reverse order.

Standard Input Stream
An input communication channel that is setup between a computer program and its environment when when the program begins execution.

Standard Out
Another name for the standard output stream.

Standard Output Stream
An output communication channel that is setup between a computer program and its environment when when the program begins execution. It is also known as standard_out.

Statement
One or more lines of code that perform a complete action. A statement that can fit on a single line is a simple statement. A statement that cannot be written on a single line is a compound statement.

Static Class
A Java class that cannot be used to create an object. A static class only contains methods and constants.

Static Method
A Java method that does not use or change the data in any object created by the class in which it was defined.

Static Variable
A variable that is common to all the instances of the class. They called class variables. Any time a method is called it can change a static variable, and that change will be remembered for each instance of the class.

String Concatenation
Combining several strings into a new string, or combining a string with values of other data types into a new, longer string.

String Literal
A group of characters written out inside a program. A string literal must be enclosed in double quotes, ".

String
A collection of characters, e.g. "Java". A string in Java is an object.

Syntax Error
Errors produced by code that does not obey the rules of the Java language.

Stepwise Refinement
Another name for Iterative Enhancement.

Strongly Typed
A language which is type-safe.

T

Text Processing
Creating, editing and formatting strings of text.

Throw an Exception
To create an exception. This is done by the Java interpreter when a runtime error is detected. Java also allows the programmer to throw an exception within the Java code.

throws Clause
A declaration that a method will not attempt to handle a particular type of exception. It uses the following format
throws EXCEPTION_NAME
and is added to the method header.
Token
A token is a string of characters in the input, marked off by special characters, usually whitespace.

Token-Based Processing
Processing input token by token, that is, one word or number at a time.

Tokenizing the Input
The process by which an input line is broken up into tokens.

Try Block
The first code block in a try/catch statement. When the Java interpreter comes across an exception inside the try block of a try/catch statement, it does not cause a runtime error. Instead, it stops executing the code in the try block and tries to find a catch block that looks for the particular type of exception that was thrown.

Type-safe
A type of programming language which requires the programmer to use the correct data type for every value and prohibits action which make no sense for that type of data.

U

Unary operator
An operator that has only one operand, for example ++ and --.

Unchecked Exception
An exception that does not have to be caught inside the method that causes the exception or be declared in the method header.

Uninitialized
The condition of a variable just after it has been declared and holds no useful data.

V

Value Semantics
A system in which values are stored directly and copying is achieved by creating independent copies of values. Types that use value semantics are called value types.

Variable
A location in the computer's memory that has a name and holds a single value. In Java, each variable has a specific data type.

Variable Declaration
A request to the compiler to set aside space in memory for a new variable with a specific name and data type.
Variable declarations have the following format in Java
VARIALBLE_NAME = EXPRESSION


W

Whitespace
Spaces, tab characters, and newline characters.

Wrapper Class
A class which contains a single primitive value, such as int or double.

X



Y



Z

Zero-Based Indexing
A numbering scheme, used throughout Java, in which a sequence of values is numbered starting with 0 (element 0, element 1, element 2, and so on).