Java Packages and Collection Framework

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

1/36

flashcard set

Earn XP

Description and Tags

Comprehensive vocabulary flashcards covering Java packages, subpackages, imports, classpath configurations, and the Java Collection Framework including interfaces, implementations, and sorting utilities.

37 Terms

1
New cards

Java Package

A group of similar types of classes, interfaces, and sub-packages that categorizes components for easier maintenance, provides access protection, and prevents naming collisions.

2
New cards

Built-in Package

A predefined package supplied by the Java platform, such as java, lang, awt, javax, swing, net, io, util, or sql.

3
New cards

package Keyword

The Java keyword placed at the top of a source file to declare the package to which the contained classes belong.

4
New cards

-d Switch

A javac compiler option that specifies the destination directory where generated .class files will be saved; using a dot (.) targets the current folder.

5
New cards

Fully Qualified Name

The complete name of a class that includes its full package prefix (such as mypack.Simple or java.util.Date), required when accessing a package without an import or to resolve naming collisions.

6
New cards

Package Import (package.*)

An import approach that grants access to all classes and interfaces in the specified package, but does not import any of its subpackages.

7
New cards

Class Import (package.classname)

An import approach that grants access exclusively to the specific class declared in the import statement.

8
New cards

Subpackage

A package located inside another package, used to categorize components further (for example, lang, net, and io inside the java package).

9
New cards

Domain-Company-Package Standard

The industry standard convention for defining Java package namespaces, formatted as domain.company.package (such as com.javatpoint.bean or org.sssit.dao).

10
New cards
<p>Java Source File Declaration Order</p>

Java Source File Declaration Order

The mandatory syntactic structure of a Java source file where the package declaration comes first, followed by import statements, followed by class declarations.

11
New cards

-classpath Switch

A command-line switch used with javac and java to explicitly tell the tools which directories or archives to search for compiled .class files.

12
New cards

Static Import

A feature introduced in Java 5 that allows static members (fields and methods) of a class to be accessed directly in code without class name qualification.

13
New cards

Java Collection

A single unit or group of objects represented and manipulated together in Java.

14
New cards

Java Collection Framework

A unified architecture in the java.util package consisting of core interfaces, class implementations, and algorithms for storing and manipulating groups of objects.

15
New cards

Collection Interface

The root interface of the collection hierarchy (extending Iterable) that defines common operations like add(), remove(), contains(), size(), and clear().

16
New cards

Iterator Interface

An interface that provides methods (hasNext(), next(), and remove()) to iterate through the elements of a collection in the forward direction only.

17
New cards

Generic Collection

A collection syntax introduced in JDK 1.5 using angle brackets to restrict collection contents to a specific object type, providing compile-time type safety and eliminating runtime typecasting.

18
New cards

ArrayList

A resizable-array implementation of the List interface extending AbstractList that allows duplicates, maintains insertion order, is not synchronized, and offers index-based random access.

19
New cards
<p>Doubly Linked List Structure</p>

Doubly Linked List Structure

A linear data structure utilized by LinkedList in which each node maintains bidirectional references to both the previous and next elements, bounded by NULL at each terminus.

20
New cards

LinkedList

A doubly linked list implementation extending AbstractList and implementing List and Deque that allows duplicates, maintains insertion order, is not synchronized, and provides fast manipulation without array shifting.

21
New cards

List Interface

A subinterface of Collection that stores an ordered collection allowing duplicate elements, supporting index-based operations and acting as a factory for ListIterator.

22
New cards

ListIterator Interface

A subinterface of Iterator designed for lists that supports bidirectional traversal using hasNext(), next(), hasPrevious(), and previous().

23
New cards

Set Interface

A subinterface of Collection that represents an unordered mathematical group containing only unique elements (no duplicates).

24
New cards

HashSet

A Set implementation backed by a hashtable that stores unique elements, provides no ordering guarantee, and relies on hashing.

25
New cards

LinkedHashSet

A Set implementation extending HashSet that contains only unique elements while preserving the insertion order of elements.

26
New cards

TreeSet

A Set implementation implementing NavigableSet and SortedSet that enforces element uniqueness and maintains elements in ascending sorted order.

27
New cards

Queue Interface

A collection interface designed for holding elements before processing, typically ordering elements in a FIFO (First-In, First-Out) manner.

28
New cards

PriorityQueue

A Queue implementation that organizes elements based on their natural sorting order or a comparator rather than strict FIFO order.

29
New cards

Map Interface

An interface that maps unique keys to values, where each key-value pair is stored as an entry.

30
New cards

Map.Entry

A subinterface nested inside Map that represents a single key-value entry and provides getKey() and getValue() methods.

31
New cards

HashMap

A Map implementation extending AbstractMap that contains unique keys, allows one null key and multiple null values, maintains no order, and is unsynchronized.

32
New cards

LinkedHashMap

A Map implementation extending HashMap that preserves the insertion order of its key-value pairs while permitting one null key and multiple null values.

33
New cards

TreeMap

A Map implementation implementing NavigableMap and extending AbstractMap that sorts key-value pairs in ascending order of keys and disallows null keys.

34
New cards

Hashtable

A legacy synchronized Map implementation extending Dictionary that stores key-value pairs in bucket arrays, prohibiting null keys and null values.

35
New cards

Comparable Interface

An interface in java.lang containing compareTo(Object obj), providing a single natural sorting sequence for instances of a user-defined class.

36
New cards

Comparator Interface

An interface in java.util containing compare(Object o1, Object o2) and equals(Object element), facilitating multiple independent sorting criteria across different data members.

37
New cards

Properties Class

A subclass of Hashtable that stores persistent configuration data where both keys and values are Strings, allowing application settings to change without recompiling Java source files.