Why identifiers in java does not start with digits?

Showing Answers 1 - 2 of 2 Answers

ramit

  • Apr 21st, 2006
 

simple data

  Was this answer useful?  Yes

uafshahid

  • Apr 30th, 2006
 

Consider

int a = 10;
int b = 2*a;

now consider a variable having the name of 2*a then what will happen

int 2*a = 89;

compiler will be confused and will not consider it as identifier

but consider it as multiplication sort of thing.

As java has no type of compiler confusion syntax thats y digits are not supported by java as starting of identifier.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions