Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

What is maximum length of java

807600Jul 23 2007 — edited Jul 24 2007
Hi, I had a small question to ask. I had to find out what is the maximum length of a variable we declare in java. Like:
int some_name = 3126;
Here the length of the above "variable name" some_name is 9 characters. If I were to write a very long name instead like
int some_name_some_name_some_name_some_name_some_name_some_name_some_name_some_name_some_name_some_name_some_name = 3126;
java still doesn't give a compile error. So I wanted to confirm whether java allows unlimited length for a "variable name".
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 21 2007
Added on Jul 23 2007
26 comments
516 views