Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

In java how every class is inheriting from Object class without using extends keyword? How can we implement our on java class in the same way?

user-image
Question added by Mohammed Naseem , Associate Software Engineer , Decision Resources Group
Date Posted: 2019/02/26
Younes LABIOD
by Younes LABIOD , Software Developer , Precision Industries

Yes it is possible to inherit a class without using extends keyword in Java. For eg in the anonymous classes , such as

 

Foo foo = new Foo(){ // some method implemented in here. };

Which can extend a class without extends.

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.