Wednesday, 2 October 2013

Java Identifiers


The names of variables in the Java language are referred to as identifiers. An identifier is a programmer-defined name for something in Java such as a variable, a class or a method. There are several rules and conventions for names in Java. A rule means that it is a requirement of Java. A convention is a generally accepted way of doing something. It is not a requirement, but rather a good idea. It ensures that all programmers use the same style. That makes it easier for programmers to collaborate.

“Identifiers can begin with a letter, an underscore, or a currency character.”

 “After the first character, identifiers can also include digits.”

 “Identifiers can be of any length.”

 “Java Beans methods must be named using camel Case, and depending on the method's purpose, must start with set, get, is, add, or remove”


" Another important point to note is that identifiers are case-sensitive."







No comments:

Post a Comment