A method in Java (and other object-oriented programming languages) that is used to retrieve the value of a private instance variable of a class. It is often called a "getter" method because it gets the value of the instance variable.
2
New cards
Actual parameter
The value passed to a method or constructor when it is called. It is also referred to as an "argument."
3
New cards
Algorithm
A step-by-step procedure for solving a problem or achieving a specific goal. In computer science, algorithms are often used to describe the process by which a program performs a specific task.
4
New cards
API
An abbreviation for "Application Programming Interface." It refers to a set of protocols, routines, and tools for building software applications. An API specifies how software components should interact with each other, simplifying software development by providing standard ways to access functionality.
5
New cards
Argument
A value passed to a method or constructor when it is called. It is also referred to as an "actual parameter."
6
New cards
Array
A collection of variables of the same data type that are stored in contiguous memory locations. In Java, arrays are objects and can be of any data type, including objects themselves.
7
New cards
ArrayList
A class in Java's standard library that provides a dynamic array implementation, allowing for the resizing of arrays as elements are added or removed.
8
New cards
ASCII
An abbreviation for "American Standard Code for Information Interchange." It is a character encoding standard that assigns unique numeric codes to letters, digits, punctuation marks, and other characters commonly used in English text.
9
New cards
Binary
A numbering system that uses only two digits, typically 0 and 1. In computer science, binary is commonly used to represent data and instructions in a computer's memory.
10
New cards
Bit
The smallest unit of data in a computer, represented as either a 0 or a 1.
11
New cards
Boolean (Java type)
A data type in Java that represents a true or false value.
12
New cards
Boolean variable
A variable in Java that can hold a Boolean value, which is either true or false.
13
New cards
Boolean expression
An expression that evaluates to a Boolean value, such as a comparison of two values using a comparison operator (e.g., "\==").
14
New cards
Bottom-up design
A software design approach that involves breaking a problem down into smaller, more manageable subproblems and designing solutions for those subproblems before designing the solution for the original problem.
15
New cards
Byte
A unit of data storage in a computer that can hold 8 bits of information.
16
New cards
Bytecode
A low-level representation of Java code that can be executed by the Java Virtual Machine (JVM).
17
New cards
Cast
A type conversion operation that allows a value of one data type to be converted to another data type. For example, casting an int to a double.
18
New cards
Checked exception
An exception that must be declared in a method or constructor's throws clause or handled with a try-catch block. Checked exceptions are used for errors that are recoverable or that the program can reasonably be expected to handle.
19
New cards
Class
A template for creating objects in Java that defines the data and behavior of those objects.
20
New cards
Class-level variable
A variable in Java that is declared as static and belongs to the class rather than an instance of the class.
21
New cards
Command line arguments
Values passed to a program at runtime through the command line, typically used to provide configuration options or input data.
22
New cards
Compiler
A software tool that translates human-readable code written in a programming language into machine-readable code that can be executed by a computer.
23
New cards
Computer science
The study of computers and computational systems, including their theory, design, development, and application.
24
New cards
Constructor
A special method in Java that is used to create and initialize
25
New cards
Data type
A classification of data in a programming language, specifying the type of data that a variable can hold, the operations that can be performed on that data, and the storage requirements for that data.
26
New cards
Declare
To define a variable in a program by specifying its data type and name.
27
New cards
Encapsulation
A principle of object-oriented programming that involves combining data and methods into a single unit called a class and controlling access to the data through public methods. Encapsulation helps ensure data integrity and security.
28
New cards
Exception (Java type)
An object in Java that represents an error or unexpected condition that occurs during program execution.
29
New cards
Explicit parameter
A parameter in a method or constructor declaration that is explicitly specified by name and data type.
30
New cards
For loop
A control flow statement in Java that allows a block of code to be executed repeatedly based on a specified condition. The for loop is commonly used for iterating over arrays or other collections of data.
31
New cards
Formal parameter
A parameter in a method or constructor declaration that specifies the data type and name of the value that will be passed into the method or constructor.
32
New cards
Garbage collection
The process in Java (and other programming languages) by which unused objects are automatically deleted from memory to free up space.
33
New cards
Generic class (in Java)
A class in Java that can work with any data type. Generic classes are defined using type parameters that specify the data type that the class will work with.
34
New cards
Generic method (in Java)
A method in Java that can work with any data type. Generic methods are defined using type parameters that specify the data type of the arguments and/or return value of the method.
35
New cards
Hexadecimal
A numbering system that uses 16 digits, typically represented as the numbers 0-9 and the letters A-F. In computer science, hexadecimal is commonly used to represent binary data in a more human-readable format.
36
New cards
If-else
A control flow statement in Java that allows a block of code to be executed conditionally based on a specified condition. If the condition is true, the code inside the if block is executed, otherwise the code inside the else block is executed.
37
New cards
Implicit parameter
A parameter in a method or constructor that is not explicitly specified in the method or constructor declaration, but is instead provided by the calling code.
38
New cards
Immutable
Refers to an object in Java that cannot be modified once it has been created.
39
New cards
Immutable objects are often used for values that should not be changed, such as dates or currency amounts.
40
New cards
Inheritance (in Java)
A feature of object-oriented programming in which a class can inherit properties and methods from another class. In Java, inheritance is achieved using the "extends" keyword.
41
New cards
Initialize
To set the initial value of a variable or object. In Java, variables are typically initialized when they are declared, while objects are initialized using constructors or initialization blocks.
42
New cards
Instance
Refers to a specific occurrence of a class in memory, created by instantiating the class.
43
New cards
Instance variable
A variable defined within a class that is unique to each instance of the class.
44
New cards
Instance variables hold data that is specific to each instance of the class.
45
New cards
Instantiation
The process of creating a new instance of a class in memory. In Java, this is done using the "new" keyword followed by the class name and any required constructor arguments.
46
New cards
Interface
A type of class in Java that defines a set of methods that must be implemented by any class that implements the interface. Interfaces are often used to define contracts between different parts of a program.
47
New cards
Method
A block of code in Java that performs a specific task. Methods can be called from other parts of the program, and can take arguments and return values.
48
New cards
Method signature
The part of a method declaration that specifies the method's name, return type, and parameter types.
49
New cards
Mutator method
A method in Java that is used to modify the state of an object. Mutator methods typically have a "set" prefix, such as "setName" or "setAge".
50
New cards
Object
A basic unit of data in Java that represents a real-world entity or concept. Objects have a state (defined by their instance variables) and behavior (defined by their methods).
51
New cards
Object (Java type)
A class in Java that is the root of the class hierarchy. All other classes in Java are subclasses of Object, and inherit its methods and properties.
52
New cards
Object reference
A value that points to a specific object in memory. In Java, object references are used to access and manipulate objects.
53
New cards
Object-oriented programming
A programming paradigm that emphasizes the use of objects and classes to model real-world entities and concepts. In Java, object-oriented programming is a key feature of the language.
54
New cards
Overloading a method
Defining multiple methods with the same name in a class, but with different parameter types. Java allows method overloading as a way to provide different versions of a method that can handle different types of input.
55
New cards
Overriding a method
Providing a new implementation for a method in a subclass that overrides the implementation of the same method in the superclass. In Java, method overriding is a way to customize the behavior of a method inherited from a superclass.
56
New cards
Parameter passing
The process of passing arguments to a method or constructor in Java. Parameters can be passed by value or by reference, depending on the data type and how the method is defined.
57
New cards
Primitive data type
A fundamental data type in Java that is not an object, such as boolean, char, byte, short, int, long, float, and double.
58
New cards
Pseudocode
A high-level description of a computer algorithm that is written in a format that is similar to a programming language, but is not meant to be executed by a computer.
59
New cards
Recursion
A technique in programming where a function calls itself in order to solve a problem.
60
New cards
Scope
The region of a program where a variable is visible and can be accessed. In Java, there are several types of scope, including class scope, method scope, and block scope.
61
New cards
Static method
A method in Java that belongs to a class rather than an instance of a class. Static methods can be called without creating an instance of the class.
62
New cards
Static variable
A variable in Java that belongs to a class rather than an instance of a class. Static variables are shared across all instances of the class.
63
New cards
'this' keyword
A keyword in Java that refers to the current instance of a class. The 'this' keyword can be used to refer to instance variables and methods.
64
New cards
Throw
A keyword in Java that is used to throw an exception. The throw statement is used to indicate that an error has occurred and to provide information about the error.
65
New cards
Throws
A keyword in Java that is used to declare that a method may throw a certain type of exception. The throws keyword is used in the method declaration.
66
New cards
Top-down design
A problem-solving technique in programming where the problem is broken down into smaller sub-problems, and solutions are developed for each sub-problem. This approach starts with a high-level view of the problem and works down to the details.
67
New cards
Unchecked exception
An exception in Java that does not need to be declared in a method's throws clause. Unchecked exceptions are typically caused by errors in program logic or runtime errors.
68
New cards
White space
Any space in a Java program that is not part of the actual code, such as spaces, tabs, and line breaks.
69
New cards
While loop
A control flow statement in Java that allows a block of code to be executed repeatedly based on a specified condition. The while loop will continue to execute the block of code as long as the condition is true.