This is not in the official oracle JDK source code. Which version are you watching?
public final class String implements java.io.Serializable, Comparable<String>, CharSequence
In any case, it doesn't matter if you wrote extends Object or not in the source code. Beware, however, if you needed to extend another legal class instead of Object , you will run into a dead end since Java does not support multiple inheritance.
Update
The OP is looking for a string declaration in the API documentation. Every class in Java should and should extend Object. However, the other thing is whether the source code says extends Object .
The String class does not have extends Object in the source code. However, an API declaration always indicates that each class implicitly extends an object.
Check out the source code .
source share