๐ŸŒป JAVA/์ •๋ฆฌ์ •๋ฆฌ์ •๋ฆฌ

๐ŸŒป JAVA/์ •๋ฆฌ์ •๋ฆฌ์ •๋ฆฌ

[Java] String / StringBuffer / StringBuilder ์ฐจ์ด์ 

* String, StringBuffer, StringBuilder ์ฐจ์ด์ ๊ณผ ์žฅ๋‹จ์ . Java๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์ข…์ข… ์ ‘ํ•˜๊ฒŒ ๋˜๋Š” ๋ฌธ์ž์—ด ํด๋ž˜์Šค๋“ค์ž…๋‹ˆ๋‹ค. (๊ธฐ์ˆ ๋ฉด์ ‘์‹œ ๋งŒ๋‚˜๊ฒŒ ๋˜๋Š” ๋ฌธ์ œ ์ค‘ ํ•˜๋‚˜.) String, StringBuffer, StringBuilder.. ๋ชจ๋‘ ๋ฌธ์ž์—ด์„ ์ €์žฅํ•˜๊ณ , ๊ด€๋ฆฌํ•˜๋Š” ํด๋ž˜์Šค์ž…๋‹ˆ๋‹ค. ๊ตณ์ด ์—ฌ๋Ÿฌ๊ฐ€์ง€๋ฅผ ๋งŒ๋“ค์–ด๋†“์€ ์ด์œ ๋Š” ๋ฌด์—‡์ผ๊นŒ์š”. 1) String ๋จผ์ € String๊ณผ ๋‹ค๋ฅธ ํด๋ž˜์Šค(StringBuffer, StringBuilder)์˜ ์ฐจ์ด์ ์€ ๋‘ ๋ฌธ์ž์—ด ํด๋ž˜์Šค์˜ ์•„์ฃผ ๊ธฐ๋ณธ์ ์ธ ์ฐจ์ด๋Š” String์€ immutable(๋ถˆ๋ณ€), StringBuffer๋Š” mutable(๋ณ€ํ•จ)์— ์žˆ์Šต๋‹ˆ๋‹ค. String์€ ๋ฌธ์ž์—ด์„ ๋Œ€ํ‘œํ•˜๋Š” ๊ฒƒ์œผ๋กœ ๋ฌธ์ž์—ด์„ ์กฐ์ž‘ํ•˜๋Š” ๊ฒฝ์šฐ ์œ ์šฉํ•˜๊ฒŒ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฌธ์ž์—ด, ์ˆซ์ž..

iseunghan
'๐ŸŒป JAVA/์ •๋ฆฌ์ •๋ฆฌ์ •๋ฆฌ' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๊ธ€ ๋ชฉ๋ก (8 Page)