์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
- ์ค๋ธ์
- 99ํด๋ฝ
- mariadb
- ์์๋ฒํธ
- ๊ทธ๋ฆฌ๋ ์๊ณ ๋ฆฌ์ฆ
- well known ํฌํธ
- ํ๋ ์ ๊ตฌ์กฐ
- ๊ฐ๋ฐ์์ทจ์
- ํ ํฐ ๋ฒ์ค
- tcp ํ๋กํ ์ฝ
- ์ฝ๋ฉํ ์คํธ์ค๋น
- IEEE 802
- ์ค๋ฅ์ ์ด
- til
- leetcode
- ๋น์ฃผ๊ธฐ์ ํธ
- ์ค๋ฅ๊ฒ์ถ
- ์ฃผ๊ธฐ์ ํธ
- ๋ฐ์ดํฐ ์ ์ก
- i-type
- tcp ์ธ๊ทธ๋จผํธ
- ํฐ์คํ ๋ฆฌ์ฑ๋ฆฐ์ง
- ์ฐ๋ถํฌdb
- ํญํด99
- git merge
- reducible
- ์๋น์ค ํ๋ฆฌ๋ฏธํฐ๋ธ
- ํ๋ก์ด๋์์
- ์ค๋ ๋
- xv6
- Today
- Total
๋ชฉ๋กJava (24)
Unfazedโ๏ธ๐ฏ
๋ฉ์๋ ์ฐธ์กฐ -ํ๋์ ๋ฉ์๋๋ง ํธ์ถํ๋ ๋๋ค์์ '๋ฉ์๋ ์ฐธ์กฐ'๋ก ๋ ๊ฐ๋จํ ํ ์ ์๋ค. ์ข ๋ฅ ๋๋ค ๋ฉ์๋ ์ฐธ์กฐ static๋ฉ์๋ ์ฐธ์กฐ (x)-> ClassName.method(x) ClassName::method ์ธ์คํด์ค๋ฉ์๋ ์ฐธ์กฐ (obj.x)->obj.method(x) ClassName::method -static ๋ฉ์๋ ์ฐธ์กฐ Integer method(String s) { //Integer.parseInt(String s)๋ง ํธ์ถ return Integer.parseInt(s); } ๋๋ค์ Function f = (String s) -> Integer.parseInt(s); ๋ฉ์๋ ์ฐธ์กฐ Function f = (String s) -> Integer::parseInt(s); -์์ฑ์์ ๋ฉ์๋ ์ฐธ์กฐ..

ํจ์ํ ์ธํฐํ์ด์ค๋ฅผ ์ฌ์ฉํ๋ ์ปฌ๋ ์ ํ๋ ์์์ ๋ฉ์๋ ์ธํฐํ์ด์ค ๋ฉ์๋ ์ค๋ช Collection boolean removelf(Predicate filter) ์กฐ๊ฑด์ ๋ง๋ ์์๋ฅผ ์ญ์ List void replaceAll(UnaryOperator operator) ๋ชจ๋ ์์๋ฅผ ๋ณํํ์ฌ ๋์ฒด Iterable void forEach(Consumer action) ๋ชจ๋ ์์์ ์์ action์ ์ํ Map V compute(K key, BiFunction f) ์ง์ ๋ ํค์ ๊ฐ์ ์์ f๋ฅผ ์ํ V computeIfAbsent(K key, Function f) ํค๊ฐ ์์ผ๋ฉด, ์์ f ์ํ ํ ์ถ๊ฐ V computeIfPresent(K key, Bifunction f) ์ง์ ๋ ํค๊ฐ ์์ ๋ ์์ f ์ํ V m..
Predicate์ ๊ฒฐํฉ -and(), or(), negate()๋ก ๋ Predicate๋ฅผ ํ๋๋ก ๊ฒฐํฉ(default ๋ฉ์๋) Predicate p = i -> i i i%2 == 0; Predicate notP =p.negate(); // i >= 100 Predicate all = notP.and(q).or(r); // 100 Integer.toBinaryString(i); Function h = f.andThen(g); Function h2 = f.compose(g); System.out.println(h.apply("FF")); //"FF" -> 255 -> "11111111" System.out.prin..
java.util.function ํจํค์ง - ์์ฃผ ์ฌ์ฉ๋๋ ๋ค์ํ ํจ์ํ ์ธํฐํ์ด์ค๋ฅผ ์ ๊ณต 1) java.lang.Runnable // java.util.function ํจํค์ง๋ ์๋ void run() : ๋งค๊ฐ๋ณ์๋ ์๊ณ , ๋ฐํ๊ฐ๋ ์์ public class MyRunnable implements Runnable { @Override public void run() { System.out.println("This is running in a thread."); } public static void main(String[] args) { Thread thread = new Thread(new MyRunnable()); thread.start(); // This will invoke the run() m..