#9.4 Exception Handling | Try with Resource

preview_player
Показать описание

More Learning :

Donation:
PayPal Id : navinreddy20
Patreon : navinreddy20
Рекомендации по теме
Комментарии
Автор

Hi sir i am now in ty.bscit and i want to join a java course is there any good classes with job placement

sandeeprapolusandeeprapolu
Автор

So the question is: Is it always better to use try with resources? Or are there some situations where it is better with only try?

MISA-qyhx
Автор

Thanks for the information. But What will be the case If we want to close multiple resources?

sirishakrishna
Автор

Can you please make video series on blockchain? Smart contract, teach us solidity ?

TrendRain
Автор

Hi Navin Sir,
Could you please help me in understanding below snippet :

try ( Statement stmt = {
// some functional code
}

In above snippet as we know the stmt i.e. the object of Statement will get closed
[Means try-with-resources will look for some reference.]
But as we can see above method getDBConnection() returns the Connection object which is not stored in any reference.
So as per my understanding the connection will be kept open and it will be in inactive state.

Please let me know whether my understanding is correct or not.
Thanks.

yogirajlanghe
Автор

how to learn laptops repairing in a website? freely.

NoorAhmed-iskp
Автор

Will it do br.close() automatically ???

eldhojames