I am taking this Oracle Java training course and don't understand the provided solution. The problem asks you to rewrite Card class and Deck class using Enum.
Why does the solution refer to the Enum classes of rank and suit using the "private final" modifier?
Isn't it redundant to use "private final"?
I just had
public class Card_using_Enum {
Rank rank;
Suit suit;
(My rank and suit enums exist outside of this class within the package.)
instead of
public class Card3 {
private final Rank rank;
private final Suit suit;