- Amazfit Active 2 NFC - jó kör
- Mire lesz elég a Z Fold8 extra akkumulátora?
- Itt a Galaxy S26 széria: az Ultra fejlődött, a másik kettő alig
- Xiaomi 17 Ultra - jó az optikája
- Hivatalos a OnePlus 13 startdátuma
- Samsung Galaxy A52s 5G - jó S-tehetség
- Xiaomi 17 - még mindig tart
- MWC 2026: Óriásakkut tuszkoltak egy szupervékony hajlíthatóba
- Azonnali mobilos kérdések órája
- Huawei Watch GT Runner 2 – óra a futóra?
Új hozzászólás Aktív témák
-
btotyi
tag
Például így :
package test;
class Szal extends java.lang.Thread {
volatile static boolean Stop = false;
// Primordial thread executes main()
public static void main(String args[]) throws InterruptedException {
// Create and start 2 threads
Szal thread1 = new Szal();
thread1.setPriority(1); // 1st thread at 1th non-RT priority
Szal thread2 = new Szal();
thread2.setPriority(1); // 2nd thread at 1th non-RT priority
thread1.start(); // start 1st thread to execute run()
thread2.start(); // start 2nd thread to execute run()
// Sleep for 10 seconds, then tell the threads to terminate
Thread.sleep(10 * 1000);
Stop = true;
}
public void run() { // Created threads execute this method
System.out.println(''Created thread'');
int count = 0;
for (; Stop != true;) { // continue until asked to stop
count++;
Thread.yield(); // yield to other thread
}
System.out.println(''Thread terminates. Loop count is '' + count);
}
}
forrás:[link]
Új hozzászólás Aktív témák
A topicot kiemeltem. Valaki nem akar egy nyitó hsz-t írni?:))
- Lenovo ThinkPad L16 Gen 1 - 16" WUXGA IPS - Ultra 5 135U - 16GB - 512GB - Win11 - 2 év gari
- AKCIÓ! iMac Pro Intel Xeon W2150B 64GB 1TB VEGA 64 16GB!!! 1 év garancia!
- Spigen Essential Ee673eu 3-portos hálózati töltő 67W Fehér (2xUSB-C, 1xUSB-A)
- Eladó Samsung Galaxy A12 4/64GB fekete / 12 hónap jótállás
- HIBÁTLAN iPhone 13 Pro 128GB Gold -1 ÉV GARANCIA - Kártyafüggetlen, MS4602, 100% Akkumulátor
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest


