Integer ki=new Integer("50");
System.out.println(ki);//Here I would expect to print the objects name something like package_name.Class@15db9742 but this didn't happen.
ki=3;//Here I would expect an error but this actually works.
When System.out.println(ki); executed then 50 appeared in the console but when I print other objects some thing like package_name.Class@15db9742 appears why 50 appeared instead of something like package_name.Class@15db9742?
I though ki is type Integer so when I assign the primitive value of 3 I should get an error but I didn't why?