Page 9 - DCAP501_Modern Programming Tools and Techniques I
P. 9

Modern Programming Tools and Techniques I



                          •   Explain data types in Java
                          •   Discuss operators in Java
                          •   Describe expressions in Java

                          Introduction
                          Sun Microsystems began the development of Java confidentially in 1991, which was later released to the
                          public in 1995. Java is comparatively a new and exciting technology. Interestingly, it was developed
                          with the aim of providing solutions for household appliances such as telephones. From there on, it has
                          developed into a fully functional programming language. Java can be integrated directly onto a Web
                          page as an applet (a Java program that can be included in an HTML page). This makes the Internet a
                          much more dynamic and interesting place to gather information, do business, or just have fun! In fact,
                          this dynamic aspect of Java is what initially sparked interest in many researchers and engineers and
                          therefore, resulted in its popularity.


                           Did you Know?
                                         Sun Microsystems originally wanted to name Java as “OAK”. But it could not do
                                         so as that name was already taken by Oak Technologies. Other names that were
                                         suggested were  “Silk and  “DNA”. Ultimately, the  name “Java”  was selected
                                         because it gave  the Web a “jolt”, and Sun intended to abstain from names that
                                         sounded very technical.

                          Java is an important object-oriented programming language that is used in the software industry today.
                          Object Oriented Programming is also known as OOP. Objects are the basic elements of object-oriented
                          programming. OOPS (Object Oriented Programming System) is used to describe a computer
                          application that comprises multiple objects connected  to each other. It is a  type of programming
                          language in which the programmers not only define the data type of a data structure (files, arrays and
                          so on), but also define the behavior of the data structure. Therefore, data structure becomes an object,
                          which includes both data and functions.
                          Just like any other programming language, Java programs consist of some basic elements such as
                          keywords, constants, variables, data types, operators and expressions that help a programmer to create
                          logical programs, and some important features such as platform-independence which enables it to run
                          on any computer platform.
                          1.1   Features of Java

                          Let us understand Java better by understanding its important features. Following features of Java make
                          it an important programming language:

                          1.   Platform Independent: The  write-once-run-anywhere  approach towards programming  is one of
                              the key features of Java that makes it a powerful programming language. The programs written on
                              one platform can run on any platform, irrespective of the hardware. But the hardware platform
                              used to execute Java programs must have the Java Virtual Machine (JVM).
                          2.   Simple: There are various features that make Java a simple language, which can be easily learnt
                              and effectively used. Java does not use pointers explicitly, thereby making it easy to write and
                              debug programs. Java is capable of delivering  a bug free system due to its strong  memory
                              management. It also has an automatic memory allocation and de-allocation system in place.
                          3.   Object Oriented: To qualify as an object-oriented language, a language must exhibit four
                              characteristics:
                              (a)    Inheritance: It is the technique of creating new classes by making use of the behavior of the
                                  existing classes. This is done by extending the behavior of the existing classes just by adding
                                  additional features as required, thus bringing in reusability of existing code.
                              (b)   Encapsulation: It refers to the bundling of data along with the methods that act on that data.



                          2                       LOVELY PROFESSIONAL UNIVERSITY
   4   5   6   7   8   9   10   11   12   13   14