Java
Programming and Technical
Programming
Arrays
Identify the correct options from the classes provided below.
More than one may be correct.
A. import static edu.ABC.model.Account.*;
public class Loan {
public double getInterest() {
return INTEREST_RATE;
}
}
B. import static edu.ABC.model.Account ;
public class Loan {
public double getInterest() {
return INTEREST_RATE;
}
}
C. import edu.ABC.model.Account ;
public class Loan {
public double getInterest() {
return Account.INTEREST_RATE;
}
}
D. package edu.ABC.model;
public class Loan {
public double getInterest() {
return INTEREST_RATE;
}
}
Read Solution (Total 1)
-
- (A) and (B) seems to be correct.
C and D doesn't even have static keyword while importing - 1 year agoHelpfull: Yes(0) No(0)
Java Other Question