Hi Everyone,
As I'm studying Wrapper Classes, I have come to know that the functionality of Long and Double are different in the sense of taking
String argument in their constructors. Below is the difference.
new Long("2f");// This will throw Runtime Exception, NumberFormatException
// Also 2F, 2l, 2L, 2d, 2D won't work
new Double("2f");// This will work at Runtime
// This will also work for 2F, 2d, 2D but NOT for 2l and 2L
Why the
java compiler is designed so confusingly. Is it a really confusion with java compiler or me? Somebody please explain this.
Thanks,
Narendranath
Cheers,
Naren
(OCEEJBD6, SCWCD5, SCDJWS, SCJP1.4 and Oracle SQL 1Z0-051)