S
Sharp Tool
Hi,
I want to check if a statement throws an exception.
If it does, I want to deal with it then and there, and not at the catch
claus.
See code below:
....
String[] str = {"dinner"};
if (str[1].charAt(0) throws ArrayIndexOutOfBoundsException) // compile error
{
//do something 1
}
else //do something 2
Is this possible?
Sharp Tool
I want to check if a statement throws an exception.
If it does, I want to deal with it then and there, and not at the catch
claus.
See code below:
....
String[] str = {"dinner"};
if (str[1].charAt(0) throws ArrayIndexOutOfBoundsException) // compile error
{
//do something 1
}
else //do something 2
Is this possible?
Sharp Tool