Saturday 15 August 2015

java - Why does ClassCastException not show the class name? -


In Java 1.4.2 and earlier versions, if you get a classless option, you can see the exception stack trace but Class No Name If you want to find out the range of objects for which castings have failed, then you have to debug.

Is this the same in later Java versions? If so, then when was it changed?

This has changed with Java 5, when the exception message starts with actual name of the class name of the object Being cast should have been there from the beginning, it took ages to add it.


No comments:

Post a Comment