In Java, using a try block inside another try block is permitted. It is called as nested try block. Every statement that we enter a statement in try block, context of that exception is pushed onto the stack.
Can we have nested try blocks?
Yes, we can declare a try-catch block within another try-catch block, this is called nested try-catch block.
Can we have two try block?
You cannot have multiple try blocks with a single catch block. Each try block must be followed by catch or finally.