Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

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 ajoutée par Mohammed Naseem , Associate Software Engineer , Decision Resources Group
Date de publication: 2019/02/26
Younes LABIOD
par 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