I’m having trouble understanding a question. The question is:
Code a statement that will make the constants in the Terms enumeration available to a class without qualification
This is my code so far;
public enum Terms {
NET_30_DAYS, NET_60_DAYS, NET_90_DAYS;
//either name() or super() can be used
@Override
public String toString() {
String s = "Net due " + name() + " days";
return s;
}
}
You’re probably looking for
There is one thing to note here. If your Terms.java is in a default package, there is not a way to do a static import on it.