AP CSA REMEMBER

studied byStudied by 51 people
5.0(1)
Get a hint
Hint

Autoboxing

1 / 25

flashcard set

Earn XP

Description and Tags

26 Terms

1

Autoboxing

the automatic conversion of primitive data types into their corresponding wrapper class objects. For example, converting an int to an Integer.

New cards
2

collaborator class

in Java refers to a class that works together with another class to achieve a common goal through collaboration and interaction.

New cards
3

composition relationship

is a "has-a" relationship where one class contains an object of another class as a part of its state. It represents a strong relationship where the child object cannot exist independently of the parent object.

New cards
4

concatenation operator

is "+", used to combine two strings or add strings to other data types. Example: "Hello" + "World" outputs "HelloWorld".

New cards
5

control structure

a block of programming that analyzes variables and chooses a direction in which to go based on given parameters. It determines the flow of execution in a program. Types include sequence, selection (if-else), and iteration (loops).

New cards
6

Downcasting

the process of converting a reference of a superclass to one of its subclasses. It is done explicitly and may result in a ClassCastException if the object being downcasted is not an instance of the subclass.

New cards
7

Encapsulation

the mechanism that binds the data (variables) with the methods (functions) that manipulate the data, ensuring data hiding and access control. It helps in achieving data abstraction and security in Java programming.

New cards
8

equals

is a method used to compare the contents of two objects for equality. It is commonly used to compare strings or objects to check if their values are the same.

New cards
9

==

This returns true if both the operands are referring to the same object, otherwise false.

New cards
10

checked exception

a type of exception that must be either caught or declared in the method signature using the throws keyword. It is checked at compile time to ensure proper handling.

New cards
11

compile time error

in Java occurs when the code does not conform to the syntax rules of the language during compilation, preventing the program from being successfully compiled.

New cards
12

run time error

occurs during the execution of a program. It is caused by conditions that occur when a program is running, such as division by zero or accessing an invalid memory address. Runtime errors can lead to program crashes or unexpected behavior.

New cards
13

syntax error

occurs when code violates the rules of the programming language, making it unable to compile. It is a mistake in the syntax of the code that prevents the program from running.

New cards
14

unchecked error

exceptions that occur at runtime and do not need to be declared in a method's signature. They are subclasses of RuntimeException and Error.

New cards
15

arithmetic exception

occurs when an exceptional condition has occurred in an arithmetic operation, such as division by zero. It is a runtime exception that can be handled using try-catch blocks.

New cards
16

array out of bounds exception

thrown when a program attempts to access an element at an index that is outside the bounds of the array. This typically occurs when a program tries to access an element at an index that is less than 0 or greater than or equal to the length of the array

New cards
17

concurrent modification exception

generally occurs when working with Java Collections. The Collection classes in Java are very fail-fast and if they are attempted to be modified while a thread is iterating over it, a ConcurrentModificationException is thrown

New cards
18

index out of bounds exception

a common runtime exception that occurs when you try to access an element at an index that is outside the valid range of a data structure, such as an array or a list.

New cards
19

null pointer exception

you are trying to access a part of something that doesn't exist. For example, in the code below we call . length() on myString , which would usually return the length of the string. In this case, the string doesn't exist (we set it to null ),

New cards
20

string out of bounds exception

a runtime exception when you try to access a character in a String at an invalid index. Attempting to access a character at an index that is either negative or outside the range of the String's length causes this exception to be thrown.

New cards
21

polymorphism

having a superclass called 'Animal' and two subclasses 'Dog' and 'Cat'. If we have a method drive() in Animal class, the same method can be used differently in the dog and cat classes.

New cards
22

insertion sort

a simple sorting algorithm that builds the final sorted array (or list) one item at a time by comparisons

New cards
23

merge sort

an efficient, general-purpose, and comparison-based sorting algorithm. Most implementations produce a stable sort, which means that the relative order of equal elements is the same in the input and output.

New cards
24

quick sort

a sorting algorithm that uses a divide-and-conquer strategy to sort an array. It does so by selecting a pivot element and then sorting values larger than it on one side and smaller to the other side, and then it repeats those steps until the array is sorted. It is useful for sorting big data sets

<p><strong>a sorting algorithm that uses a divide-and-conquer strategy to sort an array</strong><span>. It does so by selecting a pivot element and then sorting values larger than it on one side and smaller to the other side, and then it repeats those steps until the array is sorted. It is useful for sorting big data sets</span></p>
New cards
25

recursive sort

to sort a large list assuming you can recursively sort a smaller part of the list.

New cards
26

selection sort

an in-place comparison-based sorting algorithm that is known for its simplicity over other sorting algorithms. The technique involves choosing the array's smallest element and swapping it with the array's first element (if sorting in ascending order).

New cards

Explore top notes

note Note
studied byStudied by 6 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 11 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 11 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 57 people
Updated ... ago
5.0 Stars(3)
note Note
studied byStudied by 18 people
Updated ... ago
5.0 Stars(2)
note Note
studied byStudied by 9 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 8 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 1418 people
Updated ... ago
4.8 Stars(25)

Explore top flashcards

flashcards Flashcard29 terms
studied byStudied by 297 people
Updated ... ago
4.5 Stars(10)
flashcards Flashcard50 terms
studied byStudied by 8 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard80 terms
studied byStudied by 6 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard21 terms
studied byStudied by 2 people
Updated ... ago
5.0 Stars(2)
flashcards Flashcard144 terms
studied byStudied by 12 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard47 terms
studied byStudied by 9 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard49 terms
studied byStudied by 82 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard146 terms
studied byStudied by 10 people
Updated ... ago
5.0 Stars(1)