the above is giving this error warning: finally clause cannot complete normally } ^ 1 warning can any1 plz explain this (Adding code tags - which I just love doing) [ April 20, 2004: Message edited by: Barry Gaunt ]
its just a warning not an error, the code compiles If your question IS WHY DOES IT GIVE A WARNING ? I,ll try a long shot here: the finally block must comlplete before the method retruns. The compiler sees a return which means abnormal completion, so it barks a warning. If some stement was after the return it would give a compile error
"Did anyone understand what I have just explained? ... because I did not!"
Joined: Feb 10, 2004
abnormal completion due to return in finally or try
With Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode) there are this warning of Pallavi, wich is your compiler K and Kaustubh?. Pallavi, your abnormal completion is due a finally in the method start, it's a first code block in execution and the finally 'almost' always execute