I have seen that java provides IntegerCache,ShortCache,ByteCahce.. but there is no cache logic in Double/Float class. Is it because use of double values will not be that much frequent , compared to int?
I have seen that java provides IntegerCache,ShortCache,ByteCahce.. but there is no cache logic in
Share
Java doc of Double#valueOf suggests that there is a cache but there isn’t
Values from -128 to 127 are cached from all three you have mentioned which are used while auto-boxing.