Java Programming Tutorial - 9 Immutability of Strings, String Builder and String Buffer

preview_player
Показать описание
Mutable and Immutable objects, Immutability of Strings, StringBuilder and String Buffer classes
Рекомендации по теме
Комментарии
Автор

wrapper classes are mutable ? i doubt that


All primitive wrapper classes (Integer, Byte, Long, Float, Double, Character, Boolean and Short) are immutable in Java, so operations like addition and subtraction create a new object and not modify the old.

S-zx
visit shbcf.ru