File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Class inheritance. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Class inheritance." Watch "Class inheritance." New topic

Class inheritance.

Sunali Anu

Joined: Jun 04, 2007
Posts: 14
Want to know from which class a String Class is inherited.
marc weber

Joined: Aug 31, 2004
Posts: 11343

If you check the API documentation for String, you will see that String inherits directly from Object...

If there are direct known subclasses, these are also listed in the API. None are shown for String.

"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15037

The API documentation also mentiones that class String is final, which means that it cannot be subclassed - so there are no classes that extend String.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Class inheritance.
It's not a secret anymore!