Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

literals

 
karthika gkumar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java is case sensitive. but while representing hexadecimal numbers both upper case and lower case letters allowed. how it is possible?
 
Campbell Ritchie
Sheriff
Pie
Posts: 48930
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you going to say you think it should be programmed to accept only 0xffff or 0XFFFF and not both?
You can program a lexer to be case sensitive or case insensitive, or even to change case. So you can have OxFfFf, just as you can declare a float literal as 12.345f or 12.345F.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic