Object-Oriented Programming and Java Concepts

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

1/45

flashcard set

Earn XP

Description and Tags

Comprehensive vocabulary flashcards covering object-oriented programming concepts, language mechanisms, Java syntax, collections, streams, exceptions, and software design principles.

46 Terms

1
New cards

Static Typing

A type system where type information is bound to the identifier/variable and type checks are performed at compile time, enhancing reliability, IDE support, and execution performance.

2
New cards

Dynamic Typing

A type system where type information is carried by the object/value itself during runtime, enabling features such as duck typing, metaprogramming, and rapid prototyping.

3
New cards

Explicit Typing

A typing approach where type annotations must be clearly specified in the program's source code by the programmer.

4
New cards

Implicit Typing

A typing approach where types are omitted from the source code and determined dynamically or deduced automatically through type inference.

5
New cards

Garbage Collector

An automatic memory management mechanism that detects and deallocates memory occupied by dynamically allocated objects that are no longer referenced by the program.

6
New cards

Imperative Language

A programming paradigm where a program is written as a sequence of statements that change state over time, specifying how to reach a solution (close to the von Neumann architecture).

7
New cards

Declarative Language

A programming paradigm that specifies what the program should accomplish rather than how it should accomplish it, focusing on defining the problem itself (e.g., Prolog, SQL).

8
New cards

Object

An instance of a class that encapsulates an internal state (defined by properties or instance attributes) and external behavior (defined by operations or methods).

9
New cards

Encapsulation

An object-oriented principle that conceals the internal state and implementation details of an object from the outside, restricting manipulation exclusively to public operations.

10
New cards

Class Invariant

A constraint or condition on the state of class instances that must be established upon creation, held before invoking any public operation, and restored after public execution completes.

11
New cards

Method Overloading

Defining multiple methods within the same class that share identical names but have different parameter signatures (types, count, or order), resolved at compile time.

12
New cards

Method Overriding

Redefining a superclass method in a subclass with the exact same signature and return type, allowing the subclass to specialize the behavior via dynamic binding.

13
New cards

Polymorphism

The ability of different objects within an inheritance hierarchy to respond distinctively to the identical message, selecting the appropriate implementation at runtime.

14
New cards

Abstract Class

A class designated with the keyword abstract that represents an incomplete or general concept, cannot be instantiated directly, and serves as a base class in an inheritance hierarchy.

15
New cards

Interface

An abstract contract containing operation signatures and constant declarations without implementation, exposing the services of an implementing class without revealing its internal details.

16
New cards

Duck Typing

A dynamic typing property (notably in Python) where an object's suitability is determined solely by the messages it accepts and methods it supports, rather than explicit inheritance.

17
New cards

Dependency (UML)

A transient, non-structural relationship between classes where one element relies on the interface of another (such as a method parameter or local variable) without holding a permanent reference.

18
New cards

Association

A permanent, structural semantic connection between classes where participating classes maintain references to one another.

19
New cards

Aggregation

A non-symmetric association modeling a 'whole-part' relationship by reference where component parts can exist independently of the aggregate whole.

20
New cards

Composition

A strong 'whole-part' association by value where the lifecycle of component elements is tightly bound to the aggregate, meaning destruction of the whole destroys its parts.

21
New cards

Coupling

A software engineering metric measuring the degree of interdependence between modules; high-quality design strives to minimize coupling.

22
New cards

Cohesion

A design metric measuring how strongly focused and related the internal responsibilities of a single module or class are; software units should aim for high cohesion.

23
New cards

Law of Demeter

A design guideline ('principle of least knowledge') dictating that an object's method should only call methods on the object itself, its parameters, objects it instantiates, or direct components.

24
New cards

KISS (Keep It Simple, Stupid)

A design principle formulated by Kelly Johnson emphasizing that simplicity should be a key design goal and unnecessary complexity must be avoided.

25
New cards

YAGNI (You Aren't Gonna Need It)

An eXtreme Programming principle stating that developers should not add functionality until it is demonstrably necessary ('Do the Simplest Thing That Could Possibly Work').

26
New cards

DRY (Don't Repeat Yourself)

A software principle by Andrew Hunt and David Thomas asserting that every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

27
New cards

this

A pseudo-variable in Java referencing the current instance, utilized within the class body to resolve shadowing ambiguities, pass the current object, or call overloaded constructors.

28
New cards

Static Member

A class-level variable or method allocated once per class rather than once per instance, accessible without creating an instance and unable to access instance members directly.

29
New cards

Type Erasure

The mechanism implementing Java generics by stripping all generic type annotations during compilation so that bytecode contains only standard, non-generic classes.

30
New cards

Checked Exception

A Java exception inheriting from Exception (excluding RuntimeException) that must be handled explicitly with a try-catch block or specified in the method signature using throws.

31
New cards

Unchecked Exception

An exception in Java extending RuntimeException or Error that the compiler does not mandate handling or declaring in a throws clause.

32
New cards

try-with-resources

A statement construct in Java that manages the lifecycle of resources implementing AutoCloseable, ensuring their automatic closure upon exiting the block.

33
New cards

Serialization

The process of converting the in-memory state of an object into a byte sequence (using ObjectOutputStream on classes implementing Serializable) for persistence or network transmission.

34
New cards

serialVersionUID

A static final long field in a Java Serializable class that acts as a version control identifier to verify compatibility between sender and receiver during deserialization.

35
New cards

Comparable

A Java interface implemented to define the natural sorting order of instances via the method int compareTo(T o).

36
New cards

Comparator

A Java interface used to define custom or alternative sorting strategies for collections via the method int compare(T o1, T o2).

37
New cards

Pure Function

A function that has no side effects and always returns the same output for a given set of arguments without mutating any external state.

38
New cards

Referential Transparency

A property of functional programming where an expression can be substituted with its evaluated result without altering the behavior or correctness of the program.

39
New cards

Closure

A lambda expression combined with its lexical enclosing context, capturing variables from its environment (which must remain effectively final in Java).

40
New cards

Functional Interface

An interface that specifies exactly one abstract method, eligible to be implemented concisely using lambda expressions or method references, often annotated with @FunctionalInterface.

41
New cards

Stream Pipeline

A functional construct composed of a data source, zero or more lazy intermediate operations, and a single terminal operation that processes elements.

42
New cards

Intermediate Operation

A lazy stream operation (such as filter, map, limit, or sorted) that transforms a stream into another stream without executing traversal until a terminal operation is called.

43
New cards

Terminal Operation

An operation (such as reduce, collect, forEach, or count) that traverses a stream pipeline to generate a final value or side effect, thereby consuming and closing the stream.

44
New cards

OptionalDouble

A container object in Java returned by DoubleStream.average() that either contains a double value or is empty, necessitating getAsDouble() to extract the value safely.

45
New cards

JaCoCo

A Maven plugin used to compute and report test code coverage, configured using to attach to build lifecycle phases and to filter classes.

46
New cards

package Declaration

The instruction that places a Java compilation unit inside a named module/package, which must appear as the very first non-comment statement in a Java source file.