Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- bit manipulation
- 파이썬
- implement
- Data Structure
- java
- hash table
- Stack
- 구현
- Class
- Binary Search
- simulation
- array
- Binary Tree
- Counting
- two pointers
- SQL
- string
- greedy
- Matrix
- sorting
- Method
- Number Theory
- Tree
- database
- Math
- 코테
- geometry
- dynamic programming
- 코딩테스트
- 자바
Archives
- Today
- Total
목록execution (1)
코린이의 소소한 공부노트

[쓰레드의 구현 방법] 아래 두 가지 방법 중 하나를 선택한 후 run()에 쓰레드로 작업하고자 하는 내용을 채운다. 1. Thread 클래스를 상속받는다. class MyThread1 extends Thread{ public void run(){ // Thread 클래스의 run() 오버라이딩 for(int i=0; i < 5; i++) System.out.println(getName()); // 조상인 Thread의 getName()을 호출 // this.getName()에서 this가 생략된 형태 } } 2. Runnable 인터페이스를 구현한다. (권장. 자바는 단일 상속) public interface Runnable{ public abstract void run(); } class MyThre..
Java
2022. 11. 30. 00:07