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

Unit 1: Introduction to Java



                    (c)    Polymorphism: Polymorphism, which means  one  name multiple forms,  is the  ability of a
                       reference variable to change behavior according to the instance of the object that it holds.
                    (d)   Dynamic binding:  It is the  method of providing maximum functionality to a program by
                       resolving the type of object at runtime.
                    Although the forerunners of Java, like Objective C and C++, fulfill the above four characteristics,
                    they are not completely object-oriented, because they follow structured programming as well as
                    object-oriented programming. However, Java is completely object-oriented since  everything in
                    Java is an object.
               4.   Robust: Java  supports some features  such as automatic garbage collection, strong  memory
                    allocation, powerful exception handling, and type checking mechanism. The compiler checks the
                    program for errors and the interpreter checks for any run time errors, thus preventing the system
                    crash. These features make Java robust.

               5.   Distributed: The protocols like HTTP and FTP, which are extensively used over the Internet are
                    developed using Java. Programmers who work on the Internet can call functions with the help of
                    these protocols and can secure access to the files that are present on any remote machine on the
                    Internet. This is made possible by writing codes on their local system itself.
               6.   Portable: The feature ‘write-once run anywhere, anytime’ makes Java portable, provided that the
                    system has JVM. Java  standardizes  the data size, irrespective of  the  operating system or the
                    processor. These features make Java a portable language.
               7.   Dynamic: A Java program also includes significant amount of runtime information that is used to
                    verify and resolve access to objects at runtime. This allows the code to link dynamically in a secure
                    and appropriate manner.
               8.   Secure: Memory pointers are not explicitly used in Java. All programs in Java are run under Java
                    execution environment. Therefore, while downloading an applet program using the Internet, Java
                    does not allow any virus or other harmful code to access the system as it confines it to the Java
                    execution environment.
               9.   Performance: In Java, a program is compiled into an intermediate representation, which is called
                    Java bytecode. This code can be executed on any system that has a JVM running on it. Earlier
                    attempts to  achieve cross-platform operability accomplished it at the cost of performance. Java
                    bytecode is designed in such a manner that it is easy to directly translate the bytecode into the
                    native machine code by using a just-in-time compiler. This helps in achieving high performance.
               10.  Multithreaded: The primary objective that led to the development of Java was to meet the real-
                    world requirement of creating interactive and networked programs. In order to accomplish this,
                    Java provides multithreaded programming, which permits a programmer to write programs that
                    can do many things simultaneously.
               11.  Interpreted: Java programs can be directly run from the source code. The source code is read by
                    the interpreter program and translated into computations. The source code generated is platform
                    independent. As an interpreted language, Java has an error debugging facility that can trace any
                    error occurring in the program.
               12.  Architecture Neutral:  Java is also known as  an architectural neutral language. In this era of
                    networks, easy migration of applications to different computer systems having different hardware
                    architectures and/or operating systems is necessary.  The  Java compiler generates an object file
                    format that is architecture neutral. This permits a Java application to execute anywhere on the
                    network and on many different processors, given the presence of the Java runtime system.
               These features of Java have made it a popular programming language.








                                        LOVELY PROFESSIONAL UNIVERSITY                           3
   5   6   7   8   9   10   11   12   13   14   15