yılında Try catch Yuvarlak parantez/parantezler() Nedir: şöyle bilgime olarak biz <code>try catch</code> kullanmak gereğince Java
try {
//Some code that may generate exception
}
catch(Exception ex) {
}
//handle exception
finally {
//close any open resources etc.
}
Ama
bir kodda bentry(
ByteArrayOutputStream byteArrayStreamResponse = new ByteArrayOutputStream();
HSLFSlideShow pptSlideShow = new HSLFSlideShow(
new HSLFSlideShowImpl(
Thread.currentThread().getContextClassLoader()
.getResourceAsStream(Constants.PPT_TEMPLATE_FILE_NAME)
));
){
}
catch (Exception ex) {
//handel exception
}
finally {
//close any open resource
}
Ben şu bulundu Bu parantezleri neden denedikten sonra ()
anlayamıyorum.
Kullanımı nedir? Java 1.7'de yeni mi? Orada yazabileceğim ne tür bir sözdizimi?
Lütfen bazı API belgelerine de bakın.
Olası kopyalar (http://stackoverflow.com/questions/17650970/am-i-using-the-java-7-try-with -resources-doğru) –
Ne olduğunu soruyorsunuz, sadece ne olduğuyla ilgili bir soruya, aynı zamanda nasıl doğru bir şekilde kullanılacağına da sorularım var. –