public class Animal
{
}
public class Animal extends Object
{
}
?
The two class declarations above have identical outcomes. Explains why this is the case.
What will be an ideal response?
Every class in Java is actually a subclass, except one. When you define a class, if you do not explicitly extend another class, your class implicitly is an extension of the Object class. The Object class is defined in the java.lang package, which is imported automatically every time you write a program. TheObjectclass includes methods that descendant classes can use, overload, or override.
Computer Science & Information Technology