Asked by Anonymous
"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 :)
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 :)
Answers
Answered by
Anonymous
Sorry, I meant I think it may be the first answer.
Answered by
Anonymous
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
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
There are no AI answers yet. The ability to request AI answers is coming soon!
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.