Size of class in Android Development


I define a constant class, and the compiler automatically inserts a piece of code to instantiate the object, which makes the class much larger than the class defined in Java.

Is there any way to cancel the automatic insertion of this code?

java class size:227 bytes

kotlin class size:1 kb


Keyword object implies you want to create an object, so probably not.