String ๋ณ์๊ฐ Null์ผ ๋ "" ์ป๋ ๋ฐฉ๋ฒ ์ฐจ์ธ๋ ํ๋ก์ ํธ๋ฅผ ์งํํ๋ฉฐ, ๋ฉ์๋๋ด์ String ๋ณ์๊ฐ ๋ฌด์กฐ๊ฑด Null์ด ์๋ ๊ฐ์ด ๋ค์ด์จ๋ค๊ณ ์๊ฐํ์ง๋ง ์๋ ๊ฒฝ์ฐ๊ฐ ๋ค์ ๋ฐ์ํด์ ์์๋ณด๊ฒ ๋์๋ค. ๋ค์ด์ฌ ์ ์๋ input ๋ฒ์๋ฅผ ์๊ณ ๊ฐ๋ฐํ๋ฉด ์ข๊ฒ ์ง๋ง ๊ทธ๋ฌ์ง ๋ชปํ๋ ์ํฉ์ด๋ผ ์์ ๋ฐฉ์์ผ๋ก NullPointException์ ๋ง๊ธฐ ์ํด ๋ก์ง๋ด์ ์ถ๊ฐํ๋ค. // standard in Java 7 String nullString = null; String emptyString = Objects.toString(nullString, ""); // In Java 9+. returns empty string if obj is null Objects.requireNonNullElse (nullString, ..
Today I Learned
Git repository naming rule ์๋ฌธ์๋ฅผ ์ฌ์ฉํด๋ผ ์ต๋ํ ๊ฐ๊ฒฐํ๊ฒ, ์ผ๊ด์ฑโญ ์๊ฒ CamelCase๋ _ ๋ณด๋ค๋ -๋ฅผ ์ฌ์ฉํ์ 'ํ๋ก์ ํธ ์ด๋ฆ-๊ฐ๋ฐ ํ๊ฒฝ-ํ๋ก์ ํธ ๋ชฉ์ ' ํํ๋ก ๊ตฌ์ฑ // ๋น๊ทผ๋ง์ผ์ ์์๋ก ๋ค์๋ฉด carrot-spring-backend carrot-react-frontend README.md ์์ฑ ๋น์ทํ ๊ฒ ๋ ์์ ๊ฑฐ ๊ฐ์๋ฐ ๋์ค์ ๋ ์์๋ด์ผ๊ฒ ๋ค! https://rahuldkjain.github.io/gh-profile-readme-generator/ https://github.com/kefranabg/readme-md-generator ๐ Reference ๋๋ณด๊ธฐ https://stackoverflow.com/questions/11947587/is-there-a-na..