"Assuming the necessary classes have been imported, which of the following statements will compile without error?"

Object obj = new Calendar();
Calendar c = new Calendar();
GregorianCalender d = new Object();
Object e = new GregorianCalender();

I think it may be the second one, but I'd like someone to double check me. Thank you :)

2 answers

Sorry, I meant I think it may be the first answer.
Answers for the quiz
1. B- A class needs to be a parent of several sub classes, but the class itself represents too broad of a concept to make meaningful objects
2. C- public abstract String getAbbreviatnio();
3. D- Alpha[] c = new Alpha[100];
4. B- public abstract int add(int a, int b);
5. B- it is italicized
6. D- public abstract class Delta{
public void print(){
System,out.println():
}
}
7. D- Echo h = new Foxtrot();
8. B- The subclass must override the method
9. B- Character
10. D- Object e = new GergorianCalender(); <-- Your question
Similar Questions
  1. blocks all trade with another countrytaxes certain classes of imported or exported goods limits the volume of goods imported
    1. answers icon 1 answer
  2. Match each type of barrier to trade to its effect.blocks all trade with another country taxes certain classes of imported or
    1. answers icon 1 answer
  3. Match each type of barrier to trade to its effect.blocks all trade with another country taxes certain classes of imported or
    1. answers icon 1 answer
    1. answers icon 1 answer
more similar questions