translate in your language

Tuesday, September 16, 2014

Lexical Issues



(*) Java programs are a collection of  1) whitespace, 
                                                                2) Identifiers, 
                                                                3) literals, 
                                                                4) Comments, 
                                                                5) Operators,   
                                                                6) Separators, and 
                                                                7) Keywords



                                    (*) Whitespace (*)

     @) In Java, whitespace is a space, tab, or newline.

     @) Java is a free-form language. This means that you do not need to follow any 
           special indentation rules. 


           For instance, the Example program could have been written all on one line or 
           in any other strange way you felt like typing it, as long as there was at least one
           whitespace character between each token that was not already delineated by 
           an operator or separator.