Hirdetés
- Honor Magic8 Pro - bevált recept kölcsönvett hozzávalókkal
- Okosóra és okoskiegészítő topik
- Fotók, videók mobillal
- Samsung Galaxy A56 - megbízható középszerűség
- Külföldi prepaid SIM-ek itthon
- Újabb részletes képeken a Google Pixel 10a
- Méretes telekonverter az Oppo Find X9 Ultra hátán
- OnePlus 15 - van plusz energia
- Szívós, szép és kitartó az új OnePlus óra
- Kolosszális teleppel hajt lapot a Magic V6
Ú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?:))
- Corsair MP600 PRO XT 2TB Heatsink NVMe PCIe Gen. 4
- Samsung 27" 2K 2560x1440 monitor S27A850D PLS panel, kis hibákkal, DP porton kell használni!
- NEC 27" 2K 2560x1440 IPS monitor pici hibával PIVOT mód, HDMI, DP port
- Epson WorkForce Pro WF-C579RDWF (C11CG77401) A4-es, színes üzleti tintasugaras MFP nyomtató eladó
- iPhone 15 Pro Max Natúr Titán 256 GB
- GYÖNYÖRŰ iPhone 15 Pro Max 256GB Blue Titanium-1 ÉV GARANCIA - Kártyafüggetlen, MS4240
- Apple iPhone 13 128GB, Kártyafüggetlen, 1 Év Garanciával
- REFURBISHED és ÚJ - HP USB-C Dock G5 (5TW10AA) - 3x4K felbontás
- Fujitsu Esprimo D7011 Intel i7-11700 16GB 512GB 1 év garancia
- BESZÁMÍTÁS! Apple Macbook Air 13 2022 M2 8GB 512GB notebook garanciával hibátlan működéssel
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Central PC számítógép és laptop szerviz - Pécs
Város: Pécs


