CSC 335 - Java Basics

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

1/46

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 8:02 PM on 11/3/24
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

47 Terms

1
New cards

Primitive Types

Types built into the language, such as integers and floats, referenced by value.

2
New cards

Reference Types

Types that contain a reference to the object itself when variables are created.

3
New cards

Alias

Two variables that refer to the same reference.

4
New cards

New

Java keyword that allocates memory for a new object on the heap.

5
New cards

Class

Defines an object by specifying its data (fields) and methods.

6
New cards

Dereferencing

Accessing an object’s data or methods through the object name.

7
New cards

Instance

An individual object of a class, e.g., "studentOne" is an instance of the Student class.

8
New cards

Static Method

A class-defined method that does not require an object of that class type to be used.

9
New cards

Static Variable

A member variable common to all objects of a class.

10
New cards

Change a Static Variable

Use a static method call to change a static member, affecting all objects of that class.

11
New cards

Private Keyword

An access modifier that restricts use to the declaring class.

12
New cards

Public Keyword

An access modifier that allows free use by other classes.

13
New cards

Global Variables

Variables declared outside of any methods, accessible from anywhere in the program.

14
New cards

Final Keyword

A non-access modifier used to restrict what can be done to a variable, method, or class.

15
New cards

Final Variable

A constant variable that cannot be changed once initialized.

16
New cards

Final Method

A method that cannot be overridden by subclasses.

17
New cards

Final Class

A class that cannot be inherited or extended.

18
New cards

Global Variable/Static Instance Variable should be_____.

Should be non-writable to prevent editing.

19
New cards

No Global Variables

Expected practice in CSC 335; global constants like PI are acceptable.

20
New cards

Default Visibility

Used when no access modifier is specified, making something visible within the package.

21
New cards

Protected Keyword

Makes something visible within the package and to any subclasses.

22
New cards

Instance Method

A method that belongs to an object, specifying its interactions.

23
New cards

Import Statement

Used to reference classes in a package for simpler naming.

24
New cards

Fully Qualified Name

The complete package-prefixed name of a class or method.

25
New cards

Parametric Polymorphism

Ability for a single variable to work with multiple types.

26
New cards

Diamond Operator

Used when instantiating generic class objects, e.g., ArrayList.

27
New cards

Collections Framework

A set of classes related to Collection-type objects.

28
New cards

Set

A collection that does not allow duplicate values.

29
New cards

List

A sequence where each item has a position.

30
New cards

Map

A collection of key-value pairs.

31
New cards

HashSet

An implementation of the Set interface backed by a hashtable.

32
New cards

ArrayList

An implementation of the List interface backed by an array.

33
New cards

HashMap

An implementation of the Map interface backed by a hashtable.

34
New cards

TreeMap

An implementation of the Map interface backed by a red-black tree.

35
New cards

Throwable

The root of the exception hierarchy, superclass of all errors and exceptions.

36
New cards

Throw Keyword

Used for explicitly throwing a single exception.

37
New cards

Throws Keyword

Denotes that a method can throw a specific exception.

38
New cards

Try/Catch

Keywords used to handle exceptions in a block of code.

39
New cards

Inherit from One Parent Class

Java does not support multiple inheritance.

40
New cards

Object Class

All classes in Java automatically extend this class if no other is specified.

41
New cards

Equals Method

Compares references to determine if two objects are the same.

42
New cards

toString Method

Returns a String representation of an object.

43
New cards

HashCode Method

Returns a hash value (integer) for an object.

44
New cards

Polymorphism

The ability for something to take on multiple forms in Java.

45
New cards

Overloading

Methods or operators with multiple definitions but the same name.

46
New cards

Parameter Coercion

Implicitly changing an argument to fit the expected type.

47
New cards

Subtype Polymorphism

Created through inheritance, allowing methods expecting a parent type to work with child types.