Section 1

Preview this deck

Hashtable

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

1

All-time users

1

Favorites

0

Last updated

1 year ago

Date created

Mar 1, 2020

Cards (33)

Section 1

(33 cards)

Hashtable

Front

A structure that maps keys to values

Back

What are the different access modifiers?

Front

Default, Private, Protected and Public

Back

Can you have multiple catch blocks on a try statement

Front

Yes, but only one catch block can every handle your exception

Back

Catch block

Front

handles the exception that occurs in the try block

Back

List

Front

an ordered collection that allows duplicates

Back

Can you overload a constructor?

Front

Yes

Back

Map

Front

an interface that provides a data structure based on key-value pair and hashing

Back

Enhanced For Loop

Front

for(declaration : expression) { // Statements }

Back

Finally block

Front

executes whether an exception occurs or not

Back

Why does Java not allow multiple inheritance?

Front

Because two classes may define different ways of doing the same thing, and the subclass can't choose which one to pick

Back

What is an exception?

Front

An unwanted or unexpected event, which occurs during the execution of the program that disrupts the normal low of the program's instruction. To manually throw an exception, use the keyword "throw"

Back

Queue

Front

FIFO data structure

Back

Setter

Front

a public function that changes the value of a private variable

Back

Getter

Front

a public function that retrieves the value of a private variable

Back

Method Overload

Front

occurs when two or more methods in one class have the same method name but different parameters

Back

Difference between Java and C++

Front

Java is an OOP programming language whereas C++ is both Procedure and OOP programming language

Back

ArrayList

Front

dynamic sized arrays

Back

Array

Front

a fixed size data structure

Back

Are string in Java immutable? Why?

Front

Yes, because they do not provide methods that modify the state of an existing string object

Back

Stack

Front

LIFO data structure

Back

Casting

Front

Taking an object of one particular type and turning it into another object type

Back

Type an object declaration

Front

Object object = new Object()

Back

Set

Front

an unordered collection that does not allow duplicates

Back

Try block

Front

contains a set of statements where an exception can occur and is always followed by a catch block

Back

Jagged Array

Front

An array whose elements are arrays - an "array of arrays"

Back

What are the uses of the final keyword?

Front

create constants, prevent inheritance, and prevent methods from being overridden

Back

Checked exceptions

Front

exceptions that are checked at compile time

Back

Hashmap

Front

a map based collection class that is used for storing key and value pairs

Back

Method Override

Front

It allows a child class to provide a specific implementation of a method that is already provided in its parent class

Back

Static variables

Front

can only have one value across different objects

Back

How do you define a class in Java?

Front

Class MyClass { // field, constructor and method declarations }

Back

Unchecked exceptions

Front

exceptions that are not checked at compile time

Back

Instance variables

Front

can have different values across different objects

Back