Arraylist/Exceptions/Files

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

1/11

encourage image

There's no tags or description

Looks like no tags are added yet.

12 Terms

1
New cards

Characteristics of ArrayList?

  • Grows automatically

  • Shifts when removing elements

  • Can have elements of multiple types

  • No primitive types as type ArrayList use wrapper methods


2
New cards

What is a set?

  • its a list that doesn’t allow duplicates

  • doesn’t preserve order

  • has no index methods


3
New cards

What is a map?

A list that stores key - value pairs

Keys are uniqe

Value can be duplicated

4
New cards

Iterator hasNext()

checks if a another elements is available

5
New cards

Iterator Next()

returns the next element

6
New cards

What is the fail fast aspect?

Once iterator created expects the collection to remain unchanged, after modification iterator becomes invalid

7
New cards

What is an exception?

An exception is an event that occurs at runtime and interrupts the normal execution of a program.

8
New cards

How do you write an exception handler

Using a try catch block

9
New cards

Key aspect of nested try catch blocks?

If the inner catch can’t handle the error, java checks the outer block

10
New cards

What does the finally block do?

Performs operations whether or not an exception occurs.

11
New cards

What is the characteristic of Checked Exceptions?

They are required by the compiler to be caught using a try except block / declared using throws

12
New cards

What is the characteristic of Unchecked Exceptions?

They are not required by the compiler to be caught using a try except block / declared using throws