Ú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?:))
- Samsung Galaxy A22 5G, Kártyafüggetlen, 1 Év Garanciával
- Honor Pad X8 64GB, 1 Év Garanciával
- Google Pixel 10 Pro 256GB, Kártyafüggetlen, 1 Év Garanciával
- Apple MacBook Air M2 256GB SSD, 1 Év Garanciával
- Lenovo IdeaPad Gaming 3 - 15,6"FHD IPS - i5-10300H - 8GB - 512GB SSD - Win10 - GTX 1650 Ti - MAGYAR
- Bomba ár! HP ProBook 440 G8 - i5-11GEN I 8GB I 256SSD I HDMI I 14" FHD I Cam I W11 I Gar
- ÁRGARANCIA!Épített KomPhone Ryzen 7 5700X 16/32/64GB RAM RX 7600 8GB GAMER PC termékbeszámítással
- KÉSZLETKISÖPRÉSI UltraAkcióóó! MacBook Air M4 16GB 256GB Garancia - több színben!
- BESZÁMÍTÁS! ASUS A320M R3 1200 8GB DDR4 370GB SSD GTX 1050Ti 4GB Zalman T3 Plus DeepCool 400W
- GYÖNYÖRŰ iPhone 15 Pro 256GB Natural Titanium -1 ÉV GARANCIA - Kártyafüggetlen, 100% Akkumulátor
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Laptopműhely Bt.
Város: Budapest

