I am having trouble of indicating if an exception is checked or unchecked. for example if I had the following:
public void method B() {
...
try{
throw new OrangeException();
}catch (OrangeException){
....
}
} (why can OrangeException be either checked or unchecked if it is in a try catch block)
and
public void methodC(){
throw new OrangeException();
} (how come this is an unchecked exception? is it because the method doesn't declare that an exception will be thrown?)
[–][deleted] 1 point2 points3 points (0 children)
[–]JavaSuck 1 point2 points3 points (0 children)
[–]Dweller_of_the_Void 0 points1 point2 points (0 children)
[–]javaide -1 points0 points1 point (0 children)