Page 55 - CA_Blue( J )_Class9
P. 55

04


                                                                       VALUES AND TYPES
















                           Learning Objectives



                     4.1 Character Sets in Java                          4.2 How Characters are Stored in Memory?
                     4.3 Escape Sequences                                4.4 Tokens
                     4.5 Data Types                                      4.6 Variable
                     4.7 Type Conversion





                 The foundation of all language begin with characters. Different languages have different names for characters but,
                 eventually it boils downs to  being the smallest unit of any language.
                 Java is also a computer language; hence, it also has a defined character set. In this chapter, we are going to learn
                 more about these character sets.


                     4.1 CHARACTER SETS IN JAVA                                         Definition
                 Writing code in Java requires different characters including
                 alphabets, digits and some special characters that are valid   A character set is a set of letters, digits and
                 for the Java compiler. These are Unicode Character Sets.  special  characters that are supported by a

                 Different sets of character  used in  Java Language are as   programming language.
                 follows:

                                                           CHARACTER SETS






                            Alphabets                Digits               Operators              Delimiters

                 •  Alphabets: A set of letters used while writing a language which are typically finite set of distinguishable
                    symbols. Java uses all English Alphabets both small and capital letters.
                    Uppercase/Capital Letters        :      A to Z (26 alphabets)
                    Lowercase/Small Letters          :      a to z (26 alphabets)





                                                                                               Values and Types  53
   50   51   52   53   54   55   56   57   58   59   60