Page 51 - Trackpad_ipro 4.1_Class8
P. 51

These applications are embedded into a Web page and run with the help of a Web browser.
                 Now, we can develop different types of applications using Java.

                 Java follows the Write Once Run Anywhere (WORA) principle. This means that a program written
                 in Java can run on any Java-enabled machine without making any changes. Java programs do not
                 depend on the hardware of the computer. Hence, Java is a platform-independent language.
                 Java is simpler and easier to use compared to other object-oriented programming languages.
                 When developing Java, its creators incorporated the best features of existing object-oriented
                 programming languages, such as C++, Ada, and Smalltalk.

                     FEATURES OF JAVA

                 Java has various advanced features, which are as follows:

                    Simple: Java has a relatively simple structure and clearly defined syntax.
                    Case Sensitive: Java is a case-sensitive language. In Java, ‘pay’ and ‘PAY’ are not the same.
                    They are interpreted differently.
                    Object-Oriented: Java supports object-oriented  programming concepts like  classes  and
                    objects. The programs are built around objects that combine both data and functionality.
                    Platform  Independent:  A  Java  program  can  run  on  any  platform  without  modifications
                    meaning the same program will run on Windows, Linux, Macintosh, etc.

                    Secure: Java is a secure programming language that enables the development of virus-free
                    programs. It also provides various authentication techniques based on public-key encryption.
                    Robust: Java  aims to eliminate error-prone  situations by  focussing on  compile-time and
                    runtime checking.

                     WHAT IS AN OBJECT AND A CLASS?

                 As we have discussed above, an object-oriented programming language uses objects and classes.
                 Let us discuss them in detail.
                 Object


                 An object can be defined as a real-world entity such as a telephone, mouse, or bag. All real-
                 world entities have properties and behaviours. Properties represent the physical appearance and
                 qualities of an object. On the other hand, behaviour represents the functions that an object can
                 perform. For example, a computer has a brand name, type, and price as its properties. It also has
                 "calculation" as one of its behaviours.
                 Class

                 A class can be defined as a user-defined blueprint or prototype used to create objects. It contains
                 objects that have similar properties and behaviour. For example, an animal class has different
                 types of animals.

                                                               Animal



                                         Cat                    Tiger                    Dog



                                                                                              Program Coding     49
   46   47   48   49   50   51   52   53   54   55   56