#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
2
Q
initialization block vs.
static initialization block
A
executed once per object vs.
executed once per class
3
Q
order of initialization
A
- declarations and initialization blocks
2. constructor
4
Q
comparable interface methods
A
- A.compareTo(B)
(A<b>B : pos)</b> - .sort()</b>
5
Q
abstract modifier
A
can be applied to methods and classes