String originalString = "Hello, world!"; String replacement = null; // This is null String newString = originalString.replace("Hello", replacement); // Trying to replace "Hello" with null ํด๋น ์ค๋ฅ๊ฐ ๋ฐ์ํ ์ ์๋ ์์ด๋ค. ๋๋ replaceAll์ ์ผ๋๋ฐ replacement ์๋ฆฌ์ ๊ฐ์ด ๋ค๋ฅธ ๊ฐ์ฒด์์ ๊ฐ์ ธ์ค๋ ๊ฑฐ์๋๋ฐ, ๊ทธ ๊ฐ์ฒด์ ํด๋น ๊ฐ์ด ๋ค์ด์์ง ์์์ ๋ฐ์ํ ์ค๋ฅ์๋ค. ๊ฐ์ ์ธํ ํด์ฃผ๋ ์ค๋ฅํด๊ฒฐ.