In this tutorial (http://www.studytonight.com/java/object-and-classes) I read that a java class may optionally extend one parent class. By default, it will extend java.lang.Object.
Note: important statement that i was read that Java enums extend the java.lang.Enum class implicitly, so your enum types cannot extend another class.
according to note our normal java class should not extend other class like enum
(enum types cannot extend another class).but we can able to inherit one class. is this multiple inheritance.?
in java class can derived by extends
keyword. like this
class SomeClass
{ }
class MyClass extends SomeClass{}
How can all java classes by default extends java.lang.Object class without extends
keyword in java?
When our class extends some base class, it becomes multiple inheritance. I searched in stackoverflow, but still I am not clear. By default any class extends Object class. Doesn't it mean java supports multiple inheritance?
Can anybody clarify this with a simple example.