Enumeration classes in Java
Posted
by Crystal
on Stack Overflow
See other posts from Stack Overflow
or by Crystal
Published on 2010-04-26T02:55:07Z
Indexed on
2010/04/26
3:03 UTC
Read the original article
Hit count: 245
I have one class that declares an enumeration type as:
public enum HOME_LOAN_TERMS {FIFTEEN_YEAR, THIRTY_YEAR};
Is this type usable in another class? I'm basically trying to complete a homework assignment where we have two types of loans, and one loanManager class. When I try to use the HOME_LOAN_TERMS.THIRTY_YEAR in my loanManager class that does not extend or implement the loan class, I get an error saying it 'cannot find symbol HOME_LOAN_TERMS.' So I did not know if my loanManager class needed to implement the two different loan classes. Thanks.
© Stack Overflow or respective owner