Új hozzászólás Aktív témák
-
válasz
Ablakos
#12026
üzenetére
Remelem nem gond az angol:
Catch Block
You can add a catch block to a try-with-resources block just like you can to a standard try block. If an exception is thrown from within the try block of a try-with-resources block, the catch block will catch it, just like it would when used with a standard try construct.Before the catch block is entered, the try-with-resources construct will attempt to close the resources opened inside the try block. In case an exception is thrown when attempting to close one of the resources, these exceptions will be available from the exception's getSuppressed() method inside the catch block. Here is an example of a Java try-with-resources block with a catch block attached:
try(AutoClosableResource resourceOne = new AutoClosableResource("One", true)) {
resourceOne.doOp(true);
} catch(Exception e) {
Throwable[] suppressed = e.getSuppressed();
throw e;
}
Új hozzászólás Aktív témák
A topicot kiemeltem. Valaki nem akar egy nyitó hsz-t írni?:))
- Eladó egy bontatlan új Sony Xperia 10 VII 8/128Gb fekete színű készülék
- Xbox series controller pink
- MSI Thin 15 B12UC - 15.6"FHD 144Hz - i5-12450H - 16GB - 512GB - Win11 -RTX 3050 - 3 év gari , MAGYAR
- Prémium fejhallgató kábel ( Focal, Denon)
- 15.gen! Intel Core ULTRA 5 245KF (5800X3D-t veri) +wifis lap +16-32GB DDR5 RAM! GAR/SZÁMLA (nevedre)
- Xbox One X 1 TB + kontroller 6 hó garancia, számlával!
- Steam, EA, Ubisoft és GoG játékkulcsok, illetve Game Pass kedvező áron, egyenesen a kiadóktól!
- Apple iPhone 16 Pro-Desert Titanium-128GB-Akku:100%-Megkímélt Újszerű állapot!Jótállás:2028.04-ig
- HIBÁTLAN iPhone 14 Pro Max 256GB Space Black -1 ÉV GARANCIA - Kártyafüggetlen, MS4370
- LG 34WQ75X-B - 34" Ívelt IPS Panel - 3440x1440 2K QHD - 60Hz 5ms - FreeSync - USB Type-C 90W
Állásajánlatok
Cég: Central PC számítógép és laptop szerviz - Pécs
Város: Pécs
Cég: Laptopműhely Bt.
Város: Budapest


