Ananiya
06/05/2020, 5:23 PMHimanshu Sharma
06/05/2020, 5:35 PM//1st
public static int MY_FOO = 9
//2nd
public int MY_FOO = 9
anything inside companion object is singleton and the value is shared among all the class instances, whereas for your 2nd option each instance of the class can have its own value.for MY_FOO.nino
06/05/2020, 7:35 PM