Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why cant we have identifiers starting with number in java ?

 
Suren Khatana
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why cant we have identifiers starting with number in java ?

Thanks
Suren
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

regarding forums.sun.com post

Please read the FAQ about posting questions here, including the link on Be Forthright When Cross Posting To Other Sites
 
Rob Spoor
Sheriff
Pie
Posts: 20608
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The simple answer: because that's how the language was designed. Another simple answer: because no other programming language allows it.

A better answer: probably because this way, it's easier for the parser to identify whether or not something is a number or not.


Moving to Beginning Java.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic