Page 1 of 1
About Question enthuware.ocajp.i.v7.2.1025 :
Posted: Mon Sep 01, 2014 4:28 am
by Veritas
i kinda feel like im too focused on typos
Note that a try with resources block may or may not
to have any catch or finally block at all.
Looks like the "to" is too much to me.
Re: About Question enthuware.ocajp.i.v7.2.1025 :
Posted: Mon Sep 01, 2014 8:48 am
by admin
You are right. Fixed.
thank you for your feedback!
Re: About Question enthuware.ocajp.i.v7.2.1025 :
Posted: Sat Oct 04, 2014 7:18 pm
by Daniel Clinton
A moot point but maybe worth a mention in case it might help us:
As well as the try with no catch/finally isn't there a second issue with
Code: Select all
try {
try {
Socket s = new ServerSocket(3030);
}catch(Exception e) {
s = new ServerSocket(4040);
}
}
...namely that the variable s would not be in scope in the catch block?
Re: About Question enthuware.ocajp.i.v7.2.1025 :
Posted: Sat Oct 04, 2014 8:36 pm
by admin
Yes, that is also a problem.