Saibabaa Pragada wrote:Hi, This question is about Runtime ClassCastException. It throws ClassCastException because TreeSet cannot sort its elements (Double and Integer) at Runtime. My question is, How do we know that 0xCAFE is an Integer.
Oops.... apologies. Wasn't paying attention.
Literals that start with 0x are hexidecimal numbers. They are integer literals, unless they end with L, then they are long literals.
Henry