Page 101 - ComputerScience_Class_11
P. 101

In the beginning, it was called OAK (as there was an Oak tree outside the office of the developers). Later, it was
                 renamed Java (derived from Java Coffee, a type found in Indonesia).
                 Java used the principle of WORA, i.e., Write Once, Run Anywhere. Thus, it provides free execution on any platform
                 such  as  Windows,  Linux,  etc.  Also,  it  has  the  properties  of  configurable  security,  file  access  restrictions,  etc.
                 As it can run on the network, major web browsers incorporated the ability to run Java applets within web pages. This
                 made Java very popular.

                 The five main objectives that were kept in mind while developing the Java language are as follows:
                 •  Coding should be simple and object-oriented.
                 •  It must be dynamic and secure.
                 •  It must be architecture-neutral and handy.
                 •  The program should execute with high performance.
                 •  It should be platform-independent and threaded.
                 Some more features of the Java language are as follows:

                 •  It uses both the compiler as well as the interpreter.
                 •  Java is considered to be more dynamic than C and C++ as it is designed to adjust to a progressing environment.
                 •  It is a case-sensitive language.
                 •  It enables high performance.
                 •  It tries to eliminate error-prone situations as it stresses compile-time error and runtime scrutiny.


                     4.4 TYPES OF JAVA PROGRAMS
                 There are two types of Java programs, which are as follows:
                 •  Java Standalone Applications
                 •  Java Applets
                 Let us learn about these in detail.

                 4.4.1 Java Standalone Applications
                 Java standalone applications can run independently on an individual computer. In Java, the main() method is the first
                 function that starts the execution of every standalone application.
                 There are two types of Java standalone applications which are as follows:
                 •  Console-based applications

                 •  Graphical User Interface-based applications

                 4.4.2 Java Applets
                 Java applets are the small Java programs that are implanted in an HTML page and execute only within any web browser.
                 They are mainly used for executing internet programming where graphics, sounds and accepting user input are very
                 important. It executes on the client side.


                     4.5 CREATION AND EXECUTION OF JAVA PROGRAMS USING BLUEJ
                 Using BlueJ, Java programs can be developed quickly and easily. It is a platform for the Java Development Kit (JDK 1.5).
                 The main features of BlueJ are as follows:
                 •  BlueJ has a simpler and smaller interface than other specialised environments like NetBeans and Eclipse.
                 •  Since BlueJ is a Windows-based environment, it is very easy to interact with objects.
                 •  BlueJ can run on Windows, (macOS X), Linux and other platforms.





                                                                  Introduction to Object-Oriented Programming Using Java  99
   96   97   98   99   100   101   102   103   104   105   106