Page 58 - Trackpad_ipro 4.1_Class8
P. 58

Examples of some valid identifier names are Employee123, mygood_book, _address93, FirstName,

                  age, etc.
                  Examples of some invalid identifier names are 1_Name, @Address, 1234, –Age, etc.

                  Keywords

                  Keywords are reserved words that cannot be used as identifiers because they have a special
                  meaning for the Java compiler. Some of the Java keywords are given below:

                                                            Java Keywords

                   abstract            class               final               interface           static

                   assert              const               float               long                switch
                   boolean             continue            for                 new                 this

                   break               default             if                  private             throw

                   byte                do                  implements          protected           throws
                   case                double              import              public              try

                   catch               else                instanceof          return              void
                   char                extends             int                 short               while


                  Although reserved as a keyword in Java, const is not used and has no function.

                  Additionally, there are three more reserved words in Java: true, false, and null. Technically, these
                  are literal values rather than keywords. However, they cannot be used as identifiers and have
                  specific meanings for the Java compiler.

                  Data Types


                  A data type defines the size and type of value that a variable can store. Java provides two types
                  of data types: primitive and non-primitive.
                  Primitive Data Types

                  Java provides eight basic data types, as shown in the following table:

                                      Size
                   Data Type                              Minimum Value                     Maximum Value
                                    (in bits)

                   byte         8                 -128                               127

                   short        16                –32768                             32767





                                    If Excel was a magical library, how would you sort books and filter books you
                                    had read?





                    56     iPro (Ver. 4.1)-VIII
   53   54   55   56   57   58   59   60   61   62   63