블로그
- [영진전문대 컴퓨터정보계열] 자바 Thread class MyThread extends Thread{ public void run(){ for(int i=10; i>=0; i--) System.out.print(i+" ") ; } } public class testtst { public static void main(String[] args) { Thread t = new MyThread(); t.start
- [영진전문대 컴퓨터정보계열] 자바 Thread 클래스를 상속하는 방법 class MyRunnable implements Runnable{ public void run(){ for(int i=10; i>=0; i--) System.out.print (i+" "); } } public class testtst { public static void main(String[] args) { Thread t =new Thread(new
- [영진전문대학 컴퓨터정보계열] 자바 Thread class Counter{ private int value = 0; public void increment() { value++;} public void decrement() { value --;} public void printCounter() { System.out.println(value);} } class MyThread extends Thread{ Counter
- [영진전문대 컴퓨터정보계열]자바 글자 애니매이션(예제) .*; public class myapplet extends Applet implements Runnable { static final int MAX_FRAME = 200; int = null) aThread = null; } public void run(){ while(true){ // 프레임 번호를 증가시킨다. frameNumber = (++frameNumber
- [영진전문대학 컴퓨터정보계열] 스레드 - 동기화 synchronized class Counter { private int value = 0; public synchronized void increment() { value++; } public synchronized decrement() { value--; } public synchronized void printCounter() { System.out.println(value); } } class
- [영진전문대 컴퓨터정보계열프로그래밍전공] 10월 31일 수업내용 class Counter { private int value = 0; public void increment() { value++; } public void decrement() { value--; } public void printCounter() { System.out.println(value); } } class MyThread extends Thread
- [영진전문대학 컴퓨터정보계열] 자바 join .*; public class CountDownTest{ static void print(String message){ String threadName = Thread.currentThread Runnable{ public void run(){ String messages[] = { "Pride will have a fall.", "power is dangerous unless
- [영진전문대 컴퓨터정보계열] .*; public class CountDownTest extends JFrame{ private JLabel label; class MyThread extends Thread{ public void run(){ for(int i=10; i>=0; i--){ try{ Thread.sleep(1000); }catch(InterruptedException e){ e.printStackTrace
- [영진전문대학 컴퓨터정보계열] .*; class Buffer{ private int data; private boolean empty = true; public synchronized int get(){ while try{ wait(); }catch(InterruptedException e){ } } empty = false; this.data = data; notifyAll(); } } class
- [영진전문대학 컴퓨터정보계열] 스레드 - 생산자 / 소비자 class Buffer { private int data; private boolean empty = true; public synchronized int get() { while { wait(); } catch (InterruptedException e) { } } empty = false; this.data = data; notifyAll(); } } class