/**
* ๋ฌธ์์ด์ ๋ค๋ฅธ T์ ํ์
์ผ๋ก ๋ณํ // ํจ์ ์ค๋ช
*
* @throws IndexOutOfBoudsException // ์์ธ ๋ฐ์
* beginIndex ๋๋ endIndex๊ฐ 0๋ณด๋ค ์์ ๊ฒฝ์ฐ
* endIndex๊ฐ length()๋ณด๋ค ํฐ ๊ฒฝ์ฐ
*
* @param string ๋ณํํ ๋ฌธ์์ด // ํ๋ผ๋ฏธํฐ ์ค๋ช
* @param type ์ฃผ์ด์ง ๋ฌธ์์ด์ ๋ณํํ ๋ชฉํ ํ์
* @param <T> element์ ํ์
* @param <V> element์ ๊ฐ
*
* @return ๋ณํ๋ ๋ฌธ์ // ๋ฆฌํด๊ฐ ์ค๋ช
*/
public String convert(String string, Class<T> type)
/**
* Javadoc ํ
์คํธ์ฉ ํด๋์ค
*
* @author jegarnet
*/
<aside> โจ๏ธ ์๋ ์ ๋ ฌ ๋จ์ถํค : Ctrl + Alt + L
</aside>
import ํ ๋ ์์ผ๋ ์นด๋(*)๋ก ๊ฐ์ ธ์ค์ง ์๊ธฐ
{} ๊ดํธ ์๋ตํ์ง ์๊ธฐ
๋ค์ฌ์ฐ๊ธฐ๋ 4๊ณต๋ฐฑ
๊ฐ ์ํ๊ฐ ๋๋๋ฉด ๊ฐํํ๊ธฐ(;
๊ธฐ์ค)
์ฐ์ฐ์ ๊ฐ์ ์์ง๋ค ์์์ ๋์ด์ ๊ฐํํ๊ธฐ (.
, catch block)
User user = User.builder()
.id("aaa")
.build();
Annotation์ ํ ์ค์ฉ ์์ฑ
Naming
โ ๋ณ์๋ช ์๋ตํด์ ์์ฑํ์ง ์์ ๊ฒโ
sendMessage
, stop
)catch ๋ธ๋ก์ ๋น์๋์ง ์๊ธฐ
static ๋ฉค๋ฒ๋ ํด๋์ค ์ด๋ฆ์ ํ์ฉํด์ ํธ์ถํ ๊ฒ
Foo foo = new Foo();
Foo.aStaticMethod(); // good
foo.aStaticMethod(); // bad