The following code in kotlin:
Any().javaClass
Has value of java.lang.Object. Does that mean Any and Object<
No.
From the Kotlin docs (Emphasis mine)
All classes in Kotlin have a common superclass
Any, that is a default super for a class with no supertypes declared:
class Example // Implicitly inherits from Any
Anyis notjava.lang.Object; in particular, it does not have any members other thanequals(),hashCode()andtoString(). Please consult the Java interoperability section for more details.
Further, from the section on mapped types we find:
Kotlin treats some Java types specially. Such types are not loaded from Java “as is”, but are mapped to corresponding Kotlin types. The mapping only matters at compile time, the runtime representation remains unchanged. Java’s primitive types are mapped to corresponding Kotlin types (keeping platform types in mind):
...
java.lang.Objectkotlin.Any!
This says that at runtime java.lang.Object and kotlin.Any! are treated the same. But the ! also means that the type is a platform type, which has implication with respect to disabling null checks etc.
Any reference in Java may be null, which makes Kotlin’s requirements of strict null-safety impractical for objects coming from Java. Types of Java declarations are treated specially in Kotlin and called platform types. Null-checks are relaxed for such types, so that safety guarantees for them are the same as in Java (see more below).
...
When we call methods on variables of platform types, Kotlin does not issue nullability errors at compile time, but the call may fail at runtime, because of a null-pointer exception or an assertion that Kotlin generates to prevent nulls from propagating: