Posts

Showing posts with the label Identifiers

Identifiers

Image
What is identifier. A Name in Java program is called identifier, which can be used for identification purpose. It can be a class name, interface name, method name, label name, variable name etc. Example In the above example words marked with red underline are identifiers. As you can see there are 5 identifiers Test (Class Name) main (Method Name) String (Pre-defined Class Name) args (Variable Name) println(Method Name) Rules / Convention for Identifier Naming While defining Java identifier name, we have to follow some rules as listed below. Allowed characters in Java identifier are listed below.  A to Z (Uppercase letters) a to z (Lowercase letters) 0 to 9 (Digits) _ (Underscore) $ (Dollar sign) Example:  contact_number ( ✓ ) contact#   (✕) Identifier can't starts with digit. Example abc123 ( ✓ ) 123abc (✕) Java is a case sensitive language all variable listed below are different, but it is not a good pr...

Popular posts from this blog

Arrays in C Language

Variable Naming & Scope of Variable

Inline V/S Block Level Element

Variables in Go lang

Identifiers

String in golang

Constant in Go lang

Identify Variable type and values in go lang

Decision Making in Go lang

Installing go lang