Almost every Codes of any programming languages are collection of whitespace, identifiers, literals, comments, operators, separators and keywords. Whitespace Java is a free-form language. It means there is no need to follow any special indentation rules as like in python. You can write your entire program in a single line but, a developer that's not a good practice. In java whitespace is a space, tab, or newline. Identifiers An identifier is a name name assigned to an element in a program. Rules for defining Java Identifiers It contains of alphanumeric characters including '$' (dollar sign) and ' _' (underscore). It should not start with digits. Java identifiers are case-sensitive. Keywords can't be used as identifiers. Examples valid Identifiers Myvariable, i, j, count, i10, $test, this_is_good Invalid identifiers My variables //contains space 4thsem //first character is a digit a...
Comments