THE Java run time system has predefined features which

THE JAVA LANGUAGE ENVIRONMENT

(A WHITE PAPER)

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!


order now

 

CHAPTER 1: INTRODUCTION TO JAVA

Now we have systems which can work with multiple O.S. dealing with multiple frameworks .Earlier languages (like C or C++) had dependencies with reference to different architectural properties or different software in the system .For example: In C language, different memory size is allocated to integer (int) data type for 32 bit and 64 bit systems.

Needs were required to build application which can work on heterogeneous environment anytime anywhere. Internet connecting people worldwide, making data available for all to use also led to urge of developing improved versatile applications which can work without any complications on each and every system. In order to solve the older problems OOPS brought more other complications. So we needed to deal with this all which brought the Java programming language into picture by Sun Microsystems.

It would include:

Programming language which is simpler includes more speed due to interpretation part (saving time of compilation, linking, loader, testing, crashing of program and error resolving).

Transfer of programs in systems with different O.S is easier now and applications can run without any dependency (increasing portability).With efficient memory management and automatic garbage collection technique will add robust feature to our applications.

Multithreading featured more enhancements to GUI based applications as they can now have greater performance rate. Applications are adaptable to changes now and any set of working segments can be loaded into our system through network.

As Internet world is taken as a place full of data as well as insecurities due to its open channel but efficient Java run time system has predefined features which adds secure environment to it.

Thus these features are now available with Java Programming Language.

Also the very first attention gaining application made using Java is HotJava which is WWW browser where java build fragments can be downloaded and run dynamically.

With involvement of least resources, java can provide secure applications which are platform-independent. Java found its roots with a starting of research work. Main idea with the beginning of development of this language was providing a light weight, more secure, can work distributed and real time systems. Initial steps started with improvements in C++ but it involved many problems which could be best treated by developing a new language itself. It involved features of Eiffel, Smalltalk, Objective and Cedar/Mesa which overall resulted in secured, platform independent, network compatible environment. Java was developed with a picture in mind to make it hardware independent, easily transferrable and runtime adaptability.

As it included some features of C++ too so did not come as a wholly new thing difficult to understand and developers found it familiar, simpler and easier to learn. So this simple object oriented programming language did not demand large-scale training requirements.

Architectural neutral and portable feature comes in java by the Byte code generated by Java compiler. This code makes java WORA (Write once Run anywhere).The byte code generated is same for every system irrespective of differences in hardware and software resources. There is no data type dependency in java from system to system. This all is done by Java Virtual Machine (JVM) based on POSIX interface.

High performance is maintained by automatic garbage collector that runs with less priority as a background process, thus making more space available for major processes leading to higher performance.

Java is robust and secure as it has two levels for executing a program-first compilation and then interpretation. There is no use of pointer here as was in C++ which reduces the risk of dangling pointers and program crash.  Java applications are secure which restricts entry of illegal intrusions.

Java is interpreted, threaded and dynamic. On compilation of Java programs, Byte code is generated which java interpreter can further interpret ,with respect to,particular O.S. of the system. JVM has built in feature to provide interpreters for different operating system and pre-interpreted code (Byte code) is same for all machines so this makes java platform –independent.Network applied browsers like WWW , HotJava has to perform multiple tasks interaction with the end-user which becomes possible with multi-threading feature of Java. Its language library supplies thread class and run-time module gives condition lock built-ins. Static compilation, dynamic run-time environment and classes linking are only made when needed. There is on-line  services feature in java which means that any library class can be imported anytime needed.

Java Base System : Java has many libraries to perform various functions such as java.lang which is required wherever we have need of creating class-object structure. Also exceptions,wrapper classes etc are added onto it. Java.io works as standard I/O Library.java.net provides features for sockets, telnet , interfaces etc. java.util contains utility classes. Dictonary, Hash Table, Stack, Date, Time and encoder-decoder methods are found here. java.awt – Abstract Windowing Toolkit helps in increasing portability feature of java programs.

The most important feature which makes Java different from other languages is its platform-independent code with its run-time environment provided by JVM which makes java code portable and has same functionality on every system.

CHAPTER-2 JAVA-SIMPLE AND FAMILIAR

Java looked familiar to earlier languages like C and C++ because it includes many features of these languages and looks similar to them and it’s simple because it has removed many complications from the previous languages. The simplest program in java can be as follows:

HelloWorld program which prints HelloWorld

            class HelloWorld{

                        public static void main(String args){

                        System.out.println(“Hello World!”);

                        }

                        }

Here HelloWorld is a class name , class keyword is used for declaring a class .main() method is used for start of execution of program and there string HelloWorld is printed by calling println() method of out object which is class variable of System class.

Primitive Data Types in Java : Java has three divisions for primitive data types-numeric, Boolean and arrays. The difference here from earlier languages include that everything in  java is treated as object .Even encapsulation of primitive data types are also possible within library supplied objects.

Numeric Datatype: byte(8 bit),short(16 bit),int(32 bit),long(64 bit).char in C or C++ was the smallest size datatype but here it is replaced by byte. No unsigned type in integer data types. Real numeric data types include float(32 bit),double(64 bit)

 

x

Hi!
I'm Neil!

Would you like to get a custom essay? How about receiving a customized one?

Check it out