½ºÅø¸ ±¸ÇöÇѰǵ¥..µµ¿òÀÌ µÉÁö ¸ð¸£°Ú³×¿ä.


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]

±Û¾´ÀÌ :±è±¤»ï 1999³â 9¿ù 02ÀÏ 16:54:03

In Reply to: ½ºÅà °ü·Ã Áú¹®ÀÌ¿ä.. posted by ±èÀº°æ on 1999³â 8¿ù 27ÀÏ 15:23:19:

±×³É Çпø´Ù´Ò¶§ ½É½ÉÇؼ­ ¸¸µé¾îº» ½ºÅÃŬ·¡½º¿¡¿ä~
µµ¿òÀÌ µÉÁö´Â ¸ð¸£°ÚÁö¸¸.



class KimStack {
char[] stack = new char[6];
char answer;
public int head;



public synchronized char pop() {


while(head==0) {
try {
wait();
} catch(InterruptedException e) { }
}
head--;
answer = stack[head];
notifyAll();
return answer;
}


public synchronized void push(char value) {
while (head==stack.length) {
try {
wait();
}catch(InterruptedException e) { }
}
stack[head] = value;
head++;
notifyAll();
}
}





´ÙÀ½ ±Ûµé:



À̾ ±Û¿Ã¸®±â(´äÇϱâ)

À̸§:
E-Mail:
Á¦¸ñ:
³»¿ë:
HTML ÅÂ±× Æ÷ÇÔ ¿©ºÎ: HTML ¹®¼­ÀÏ °æ¿ì üũ
°ü·Ã URL(¼±ÅÃ):
URL Á¦¸ñ(¼±ÅÃ):
°ü·Ã À̹ÌÁö URL:


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]