21 Aug 2013

A case that where java is not case-sensitive !!

All of us know that java  is a case-sensitive language. But there is a case where java doesn't follow the case-sensitive fashion. Java is not case-sensitive when it comes to literals.
There are various types of literals-Boolean Literals, Character Literals, Integer Literals, Floating-Point Literals, String Literals, Null Literals. For example,

int  Value = 0X64;
In Integer Literals, Hexadecimal literals begin with 0x or 0X, followed by the ASCII digits zero through nine and the letters a through f (or A through F). So when we write 0X  in the place of 0x, java compiler will not generate any error.

No comments:

Post a Comment