Please enable JavaScript to use CodeHS

Texas CS 2 Glossary

Flashcards

Course:

Module:

Lesson:

Search:

Data Structure Java

A particular way of organizing data in our programs.

Object Java

An object is a single instance of a Java class. An object has both state and behavior.

Primitive Type Java

Primitive types are the basic, simple data types that are inherent to Java (int, double, char, and boolean)

Array Java

A data structure that stores a **fixed** number of elements, all of the same type, one after another like a list.

Array Index Java

The position of an element in an array. The first element is at index 0, the second element is at index 1, and so on.

Indexing into an array Java

Getting a value at a particular index in an array.

Array length Java

The number of elements an array can hold. You can get the length of an array `arr` by typing `arr.length`

Declare a variable Java

Declaring a variable is defining it for the first time.

Initialize a variable Java

Initializing a variable is giving it an initial value, or a starting value.

2D Array Java

A 2D Array is an array of arrays, used to represent tables, grids, and matrices.

Row-major Order Java

The ordering of 2D arrays is row-major order, meaning the first index is the row, and the second index is the col. `arr[2][0]` would access the element on the third row and first column.

Nested For Loop Java

A for loop written, or “nested”, inside of another for loop. For example:

Loop General

A loop is a way to repeat code in your program.

Loop

Class Java

A class is a template, or a blueprint, from which Java objects are created. All Java programs start with a class.

Method Java

A method is a way to teach the computer a new command

For Each Loop Java

A for loop that is written differently so that it loops through each element in a data structure, as opposed to having a loop counter variable that goes from 0 to length-1.

HashMap Java

A data structure that stores key -> value mappings.

Key Java

A key is the value used to look something up in a HashMap

Value (HashMap value) Java

The value is the result you get when you look up a key in a HashMap. It is the value paired with a key.

Exception Java

An exception is thrown by Java when a **runtime error** is encountered. The exception provides information about what kind of error occurred.

Iterating over an array Java

Looping through all of the elements of an array

ArrayList Java

ArrayList is a Java class that is like an Array with extra powers. It can automatically resize and comes with other helpful methods.

List Interface Java

A Java Interface that represents a general List. The interface provides a list of methods that classes should implement if they want to be used as a List.

Number System General

A number system defines how we represent numbers. It defines which digits we can use, and what value each position (place value) in a number has.

Binary General

The binary number system is the Base 2 Number System. It is a number system that only uses 2 digits (0 and 1).

Number Base General

The number base of a number system defines how many digits are in the number system, and the base of the exponent for each place value in a number.

Iterate General

A single run through the instructions contained a loop

Iterate

For Loop Java

A for loop lets us repeat code a **fixed number of times**.

Pointer Java

When an object is assigned to a variable, the variable doesn't hold all of the object's data, it only holds a *pointer* to the object's data. The variable holds a memory location (think of it as a pointer to that memory location), and the object data is stored at that memory location.

Package Java

Related classes are grouped together into packages.

Decimal General

The decimal number system is the Base 10 number system. It is a number system that only uses 10 digits (0 through 9).

Octal General

The octal number system is the Base 8 number system. It is a number system that only uses 8 digits (0 through 7).

Hexadecimal General

The hexadecimal number system is the Base 16 number system. It is a number system that only uses 16 digits (0 1 2 3 4 5 6 7 8 9 A B C D E F)

Bit General

Bit means "binary digit". A bit is a single digit in a binary number. A bit can either be 0 or 1.

Byte General

A byte is 8 bits.

Kilobyte General

A kilobyte (kB) is 2^10 bytes (1024 bytes) of binary data.

Megabyte General

A megabyte (MB) is 2^20 bytes (1024 kB) of binary data.

Gigabyte General

A gigabyte (GB) is 2^30 bytes (1024 MB) of binary data.

Interface Java

An interface provides a list of methods that *must* be defined if a class chooses to implement the interface.

Network Protocols Java

Protocols for data sharing on the internet that define rules and conventions for communication between network devices.

Data Privacy Java

The appropriate use of data based on circumstances

Data Security Java

The integrity, confidentiality, and availability of data

Enhanced For Loop Java

A loop that is an alternate to a for or while loop that accesses each value in an array starting at the first value and proceeding in order.

Enhanced For Loop Variable Java

Variable created in the enhanced for loop header that contains a copy of the array variable.

Row Major Order Java

The process of traversing a 2D array by accessing all elements in a row before moving on to the next row.

Column Major Order Java

The process of traversing a 2D array by accessing all values at the first column in every row, before moving to the next column