Hi to everyone I am new to java i want to know in all the try ,catch,finally blocks return statements exists if an exception raised in the try block then which return statement execute and if an exception not raised in the try block then which return stetment execute. Any one know answer for this question please give me answer thank you
In an effort to help you get the most from our forums, we've compiled a list of tips for asking questions here. You can find the list in our FAQ section here. In particular please see: CarefullyChooseOneForum
The JavaRanch forums are divided by category. You stand a much better chance of getting a good answer if you ask your question in the right one.
I'll move this to Java In General (Intermediate) for you.
Again, welcome to JavaRanch and good luck with your question. -Ben
Clear as mud I guess people generally use finally{} when they need to clean up irregardless then?
John Grath
Greenhorn
Joined: Sep 18, 2007
Posts: 15
posted
0
Remember, finally code is always executed regardless if an exception was throw n or not.
Nicholas Jordan
Ranch Hand
Joined: Sep 17, 2006
Posts: 1282
posted
0
[Chris Corbyn :]Can someone explain what the difference between using "finally" and just putting the code after the try/catch is too?
I snagged on this earlier also. This time the beginner with Posts == 4 gets the answer.
GIVEN:
What you get is a badly hung machine and a fouled-up mess that would be better left to recovery team. [ September 22, 2007: Message edited by: Nicholas Jordan ]
"The differential equations that describe dynamic interactions of power generators are similar to that of the gravitational interplay among celestial bodies, which is chaotic in nature."
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.