Quantcast
Channel: User Federico klez Culloca - Stack Overflow
Viewing all articles
Browse latest Browse all 496

Comment by Federico klez Culloca on In Java, whether length 1 primitive type array or, its wrapper object is good in performance or memory friendly?

$
0
0
Before focusing on memory performance (which you can measure with a profiler, by the way) I would go with correctness. Using an array to wrap a single value just because an array is technically an object is working around the language. The correct wrap type for a char is Character. That's what those classes (Integer, Double, Character) etc. are for.

Viewing all articles
Browse latest Browse all 496

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>