Hi Conrad, Your question is moot because the JVM specifies the following.
When an exception is thrown, control is transferred from the code that caused the exception to the nearest dynamically-enclosing catch clause of a try statement (�14.19) that handles the exception.
Since your code is not inside a try/catch block program control will go out of the method you are in to find one. If none is found the the JVM will stop your application/applet. Regards, Manfred.
I tried compiling it but didn't got any exception. I think string2 gets initialized to a newly created String object so that it represents an empty character sequence. String string2 = new String();
Cheers,<br />Rani<br />SCJP, SCWCD, SCBCD
Conrad Kirby
Ranch Hand
Joined: Jun 17, 2001
Posts: 178
posted
0
Well, does it return ""? I guess I don't know a lot about excepions.
Conrad Kirby
Ranch Hand
Joined: Jun 17, 2001
Posts: 178
posted
0
thanx parameet. I forgot to show that the block of code was in a try statement. But as long as it returns "", i don't need a try statement.