G
Guest
One of our classes has a method to look up an object. If the object
does not exist, it throws an exception to indicate that. I thought it
would be better to just return null, as exceptions incur overhead. I
talked to the senior java developer who wrote the class, and he said
that recent versions of Java have improved exceptions to the point
that they do not really incur any overhead. Is this true?
does not exist, it throws an exception to indicate that. I thought it
would be better to just return null, as exceptions incur overhead. I
talked to the senior java developer who wrote the class, and he said
that recent versions of Java have improved exceptions to the point
that they do not really incur any overhead. Is this true?