why do we need try catch block in code code example
Example: can we have any code between try and catch blocks
We shouldn’t declare any code between try and catch block.
Catch block should immediately start after try block.
try{
//code
}
System.out.println(“one line of code”); // illegal
catch(Exception e){
//
}