I have written a method, and added an exception handling block.
I have looked at the bytecode and I have seen it added the following line at the top of the method.
TRYCATCHBLOCK L0 L1 L2 java/lang/Exception
and not much of bytecode, actually in the try
block there isn't any bytecode.
So, out of curiosity, If exceptions do not occur - do they affect performance?
btw - not duplicate of this, since the answers are not related (dotnet, irrelevant tests).