OOP Midterms Flashcards

1
Q

Can be inherited but not instantiated

A

Abstract Class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

method only for abstract class, methods that don’t require implementation for its declaration.

A

Abstract Method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

All subclass should implement the abstract method

A

Method Signature

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

If class is abstract have abstract method

A

Realization

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Cant be inherited but can instantiate

A

Final Class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Cannot be override by connected classes

A

Final method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Classes that implement an interface inherits only method signature

A

Interface Inheritance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Key word used for implementing interface

A

“implements”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Constant and prevents the reference from changing, vallue can be changed but not the size

A

Final Variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Object that groups multiple elements into a single unit

A

Java Collections

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Collection framework 3 elements

A

Interface
Implementations
Algorithms

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

It is how you handle the collections

A

Interfaces

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The classes that actually hold the data

A

Implementations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Useful routines

A

Algorithms

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Enforce type on the collection

A

Generics

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
  • stores elements in order added
  • similar to array but growable
  • allows to get and set using index
  • fast in getting and setting elements
  • slow in inserting and removing elements
A

List Collection

17
Q
  • no duplicate
  • maintain its order
A

Set collection

18
Q

Not sorted set

A

Hashset

19
Q

Sorted set

A

Treeset

20
Q

An object that map keys to values

A

Map Collection

21
Q

Not sorted map collection

A

Hashmap

22
Q

Sorted Map collection

A

Treemap

23
Q

was used to provide generic iteration for collection implementations

A

iterator

24
Q

How to determine class of an object

A

getClass()

25
Q

a nested class and it doesn’t need the reference of the outer class.

A

Static class

26
Q

there is only one copy of the variable in memory, regardless of how many instances of the class are created.

A

Static Variables

27
Q

used to check whether an object is an instance of a particular class or implements a particular interface.

A

InstanceOf

28
Q

allocates a memory location for the object and returns reference of the memory location

A

New Operator

29
Q

a number pointing to a memory location

A

Reference

30
Q

parameter passing

A
  • pass-by-value
  • pass-by-reference
31
Q

garbage collection
an object loses a reference when:

A
  • reference goes out of scope
  • reference is pointed to another object
  • reference is pointed to null
32
Q

belongs to the class as a whole, not to a certain class

A

Static Members

use keyword: (static)