glossary Flashcards Preview

m250 > glossary > Flashcards

Flashcards in glossary Deck (86)
Loading flashcards...
1

abstract class

A class that defines acommonmessage protocol andcommonset of instance variables fori ts subclasses. In Javaanabstract classcannot be instantiated.

2

access level

The scope foraccess that exists for a softwarecomponent such as amethod. There are four access levels in Java: public, private, protected and default. The default level occurs whennoaccess modifier is specified

3

access modifier

Oneofthree Java keywords (public, private, protected)which specify thev isibility of variables andmethods.

4

actual argument

An actual argument is a value used in a message that is copied to a formal argument for use inside the corresponding method. Actual arguments must be of a compatible type with their corresponding formal arguments. They are sent to a method or constructor e.g. add(no1,no2)

5

annotation

a piece of code in a source file that indicates a programmer’s intention to the compiler. The only annotation we use in M250 is @Override.
All annotations begin with the character @ in Java.

6

array

An indexable, fixed-size collection whose elements are all of the same type.

7

array initialiser

An expression that can be used to initialise an array using assignment, a shortcut way of initialising array elements.

8

assert

The keyword in a Java assertion statement used to indicate a condition that should be true in order for the code to be correct, particularly used in private methods.

9

assertion

A statement in the Java language that enables you to test your assumptions about your program; a condition that a programmer believes should be true.
assign See assignment.

10

assignment

the process that results in the variable on the left-hand side of the assignment operator receiving a copy of the value on the right-hand side of the assignment operator. The value may be a primitive value or a reference to an object. If the right-hand side of the assignment operator is an expression, it is evaluated first.

11

assignment operator

An operator (=) used to assign a value to a variable in an assignment statement.

12

attribute

Some property or characteristic of an object that can be accessed using a getter method. Attributes are generally implemented by instance variables. Examples of such attributes are position and colour for Frog objects, and balance and holder for Account objects.

13

auto-boxing

This is the automatic process of wrapping primitive values when called for by the context of usage in a Java program.

14

auto-unboxing

This is the automatic process of unwrapping primitive values when called for by the context of usage in a Java program.

15

bucket

A data structure that can contain zero or more unsorted elements. A HashSet uses buckets to implement a set. The hash code of each incoming element is used to decide which bucket to store it in.

16

buffer

Could refer to either an area used for temporary storage as data is transferred between a data source and a data sink, or a sequence of unfilled components that allows a StringBuilder object to grow.

17

bug

The cause of a run-time error.

18

call stack

A representation of the order of methods called at some point during the execution of a program, shown as a stack of method names, with the first called method on the bottom and the last called method on the top.

19

catch

The process of catching an exception, and the keyword introducing the clause in a try-catch statement that handles an exception.

20

chaining

Constructors are said to be xxxed, meaning that when an object is created, the constructors of all its superclasses are also called, either explicitly or implicitly.

21

checked exception

An exception that the compiler requires the programmer to explicitly handle or declare may be thrown in a method header using a throws clause. These exceptions are ones that a programmer may reasonably be expected to catch or should be made aware of.checked at compile time ioexception

22

header

The line in a class definition which gives its access modifier, name and, optionally, the name of a class it extends and the name(s) of any interface(s) it implements. Example usage: public class WeatherFrog extends Frog implements WeatherClient class method

23

class variable

a variable declared with the keyword static. associated with a class rather than with any of its instances, although each instance of a class can access its own class’s class variables. A class only ever has one copy of each of its class variables. See qualified for details of how class variables are accessed.

24

collection

consists of a number of, possibly zero, objects (strictly object references) or primitives. The objects or primitives within a collection are referred to as elements.

25

Collection Class

A set of library classes used to create various kinds of collection such as tree structures and queues. When capitalised, this phrase usually refers to classes that are part of Java’s Collections Framework, which excludes array types. When used in lower case, the same phrase generally means any class that implements a collection (in the looser English language sense), which includes array types.

26

Collections Framework

Framework includes a set of collection interfaces (Collection, Set, List, Map, and others), a set of collection classes (e.g. HashSet and HashMap) that implement them, and some supporting utility classes (e.g. Collections).

27

common message protocol

A set of messages shared by a number of classes.

28

Comparable

An interface that allows an element type to be sorted. It contains a single method: compareTo().

29

compareTo()

The sole method of the Comparable interface. Allows classes of objects implementing this interface to be sorted (i.e. gives them a natural ordering).
comparison operators A set of operators used for comparing values of expressions, including ==, > and < .

30

compilation error

An error detected by a compiler when code is compiled (which is known as compile-time). No bytecode is generated if there are