How did Kotlin define Its own built-in classes?

76 Views Asked by At

I have a question for a long time and I haven't found any answer for it. The question is: How Kotlin defined Its own built-in classes like Int and String. I mean there is a class named Int in Primitives.kt. How it is possible. Even it has some Int variables in itself. I some languages like C++ has created string class by itself, but C++ has pointers which even I can do create a string class by it. But in kotlin the way is different which all types in Kotlin are pointers. I want to know how the compiler does that.

0

There are 0 best solutions below