java chap. 14

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/39

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 4:31 AM on 4/21/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

40 Terms

1
New cards

*Object*

A grouping of data (fields) and operations (methods) that can be performed on that data.

2
New cards

*Class*

A code "blueprint" that describes the data an object can hold and the actions it can perform.

3
New cards

*Instance*

An individual object created from a class in memory.

4
New cards

*Fields*

Internal data variables held by an object, also known as data members or instance variables.

5
New cards

*Methods*

Operations or actions an object can perform, often used to manipulate the object's data fields.

6
New cards

*Unified Modeling Language (UML)*

A set of standard diagrams used to graphically depict object-oriented systems, showing class names, fields, and methods.

7
New cards

*Access Specifier*

A Java keyword, such as *public or private*, that indicates how a class member can be accessed.

8
New cards

*Public Access Specifier*

Allows a class member to be accessed by code both inside and outside the class.

9
New cards

*Private Access Specifier*

Restricts access to a class member so it can only be accessed by methods within the same class; this is the basis for *data hiding*.

10
New cards

*Accessor (Getter)*

A method that retrieves the value of a private field without modifying it.

11
New cards

*Mutator (Setter)*

A method that modifies the value of a private field.

12
New cards

*Stale Data*

Data that has become outdated because it depends on other variables that have changed; it is best avoided by calculating values dynamically in methods.

13
New cards

*Constructor*

A special method automatically called when an object is created to perform initialization tasks; it has the same name as the class and no return type.

14
New cards

*Default Constructor*

A no-argument constructor provided automatically by Java if no other constructor is written; it sets numeric fields to 0 and reference variables to *null*.

15
New cards

*Method Overloading*

Defining multiple methods or constructors with the same name but different parameter lists.

16
New cards

*Method Signature*

The combination of a method's name and the data types of its parameters in order; the return type is not included.

17
New cards

*Binding*

The process the compiler uses to match a method call with the correct version of an overloaded method based on its signature.

18
New cards

*Shadowing*

When a local variable or parameter has the same name as an instance field, hiding the field's value within that method.

19
New cards

*Static Field*

A variable that belongs to the class itself rather than any specific instance; it is allocated in memory only once and is shared by all objects of that class.

20
New cards

*Static Method*

A method that can be called at the class level without creating an object; it cannot communicate with non-static instance fields.

21
New cards

*this Reference*

An implicit parameter that allows an object to refer to itself; often used to overcome shadowing or to call one constructor from another.

22
New cards

*Pass by Value*

The mechanism where Java passes a copy of an argument's value to a method; for objects, this value is the *memory address (reference)*, not the object itself.

23
New cards

*toString Method*

A method that returns a string representation of an object; it is called implicitly when an object is passed to *System.out.println* or concatenated with a string.

24
New cards

*Wrapper Class*

A class that "wraps" a primitive data type into an object (e.g., *Integer for int, Double for double*).

25
New cards

*Autoboxing*

The automatic conversion of a primitive data type into its corresponding wrapper class object.

26
New cards

*Unboxing*

The automatic conversion of a wrapper class object back into its corresponding primitive data type.

27
New cards

*Immutable*

The characteristic of an object (like *Strings and Wrapper class objects*) that prevents its contents from being changed after it is created.

28
New cards

*ArrayList Class*

An ordered list of reference type items that automatically expands and shrinks as items are added or removed.

29
New cards

*ArrayList size() Method*

Returns the number of elements currently stored in the ArrayList.

30
New cards

*ArrayList get(int index)*

Returns the element at the specified index; indices start at 0.

31
New cards

*ArrayList set(int index, element)*

Replaces the element at the specified index with a new value and returns the old value.

32
New cards

*ArrayList add(element)*

Appends a new item to the end of the list.

33
New cards

*ArrayList remove(int index)*

Removes the item at the designated index and shifts subsequent items to fill the gap.

34
New cards

*Diamond Operator (<>)*

A shorthand used in ArrayList declarations (Java 7+) where the compiler infers the data type from the variable declaration.

35
New cards

*Capacity*

The number of items an ArrayList can hold before it must automatically increase its size; the default is 10.

36
New cards

*Package*

A grouping of related types, classes, and interfaces (e.g., *java.util, java.io*).

37
New cards

*Fully Qualified Name*

The complete name of a class including its package, such as *java.util.Scanner*.

38
New cards

*Wildcard Import ()**

An import statement that imports all classes within a specific package (e.g., *import java.util.;**).

39
New cards

*equals() Method*

A method used to compare the content/values of two wrapper objects or strings, as opposed to *==* which compares their memory addresses.

40
New cards

*compareTo() Method*

Returns 0 if two wrapper values are equal, a negative number if the first is less than the second, and a positive number if it is greater.