What is the minimum and maximum length of an identifier?

Answer Posted / jai

From a language specification perspective, there is no
limit. From a class file perspective, there is a 64K byte
limit to names. For ASCII identifiers, that would be 65535.
For identifiers beyond the ASCII range, that could be
considerably less, as they are stored in Unicode Transfer
Format (UTF), taking up from 2-3 bytes / character.

Is This Answer Correct ?    12 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I convert a numeric ip address like 192.18.97.39 into a hostname like java.sun.com?

607


Can we have multiple classes in single file ?

616


How many types of classes are there in java?

525


Explain java heap space and garbage collection?

594


What happens if a constructor is declared private?

539






Why strings in java are called as immutable?

598


What is an example of a keyword?

552


What is floor math?

521


How many types of the indexof method are there for strings?

495


Can two objects have same hashcode?

570


What are the advantages of exception handling?

560


What is a wrapper method?

541


What is the purpose of static methods and variables?

535


Is integer passed by reference in java?

574


What is the string function?

561