Enum Flashcards

1
Q

Are enum constants in Java shared or separate instances?

A

They are separate — each enum constant is its own singleton object.

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

Can enums have instance variables in Java?

A

Yes! Each enum constant can have its own copy of instance variables.

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

Are instance variables shared across enum constants?

A

No — each enum constant has its own instance variables, not shared.

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