#7 abstract classes + cmsc 131 review Flashcards

(5 cards)

1
Q

initialization block

A

block of code used to initialize static or nonstatic fields

good for sharing code btwn multiple constructors

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

initialization block vs.

static initialization block

A

executed once per object vs.

executed once per class

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

order of initialization

A
  1. declarations and initialization blocks

2. constructor

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

comparable interface methods

A
  1. A.compareTo(B)
    (A<b>B : pos)</b>
  2. .sort()</b>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

abstract modifier

A

can be applied to methods and classes

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