IT-Language/IT-Java6 java RuntimeException A RuntimeException is a class in the Java programming language hierarchy used to handle exceptions that can occur at runtime, which are not checked by the compiler. These exceptions are part of the "Unchecked Exception" category, meaning that they do not require explicit handling using try-catch blocks or throws declarations, allowing the program to continue running even when such exceptions occ.. 2023. 11. 5. Java와 VC++ 동기화 비교 wait, notify(All), synchronized int Count = 0; ////////////// Main Thread ////////////// synchronized(SyncObj) // (1) { Count++; SyncObj.notify(); // (2) } //////////// Sub Thread 1 ~ N //////////// while(true) { synchronized(SyncObj) // (3) { if(Count == 0) { SyncObj.wait(); // (4) } if(Count == 0) // (5) { // (A) ? } Count--; // (6) } // .... } Java의 동기화를 위해서 사용되는 함수로는 wait와 notify(All)가 있다. 특.. 2023. 11. 5. 이전 1 2 다음