Java Language

Java Language – Introduction

Like C++ and Smalltalk, Java Language is object-oriented with a good support of standard class libraries, known as Java API (Application Programming Interface). Java API supports graphics, graphical user interface (GUI), mathematical and threaded operations, applets and applications etc. With its rich API, architecture neutral support and Java Virtual Machine, Java sometimes referred as a platform itself called Java Platform.

Java looks familiar to a novice as much of the syntax is borrowed from C/C++. The major variation is that Java does not support pointers. The compilation of Java application results in a .class file containing bytecode. The bytecode file can run on any operating system and hardware irrespective of the operating system on which it was compiled.

History of Java Language – Evolution

Java is developed by a team of engineers headed by James Gosling at Sun Microsystems and released to the market in November, 1995. Java influenced Internet and in fact Internet peddled its strength in 1995, the year Java was released. As on today, Java is an invisible force behind many applications of Web, distributed and mobile phones etc.

The Java project started its way in 1991 to use in set-top boxes. Set-top box is a unit that connects a television set to an external signal. The signal is converted into content and displayed on television screen to the viewers; a visualization to network the digital devices with computers finally. The project was initially named as Green project and afterwards renamed to Oak, on the name of Oak tree that stood in the premises of Sun Microsystems. Finally, at the time of release, Oak was renamed (as the name Oak was existing by that time as a name of a software company) as Java, as suggested by Kim Polese, a Oak product manager in the team of James Gosling and the discussion came when they were in a coffee-shop (other names stood for final selection were DNA and Silk). Java (Jawa, in Indonesian language) is an island in Indonesia famous for coffee plantations and volcanic mountains.

Gosling’s aim was to develop a virtual machine that can “write Once, Run Anywhere“, meaning compile once and run on any system. Another aim was to make Java as simple as possible avoiding many confusing concepts of other languages so that the programmer should feel comfortable to learn and practice. Due to its simplicity, Java became very popular within no time and the work on the Java language development did not see back. Whenever, Java is added with more functionality with new classes and packages, the Sun Microsystems releases a new Java (JDK) version. The major changes to Java came with Java 2 (JDK 1.2) version, released in 1998, that included three components – J2ME (Java 2 Micro Edition), J2SE (Java 2 Standard Edition), J2EE (Java 2 Enterprise Edition).

Now the world is concentrating on digital devices (like toasters, refrigerators etc.), now mobiles, and much development work is going on this field to make the devices to be better smarter, functional and entertaining and the best chosen is Java. Now, Java is everywhere. Java infuses much into production software and is a driving force behind many applications ranging from mobile phone sets to games and e-business etc. From the day of its release, Java revolutionized the whole programming world and changed the computing world even beyond the expectations of the designers.

Android, the mobile operating system developed by Google, is based on Java. The Android programming is done in Java.

C++ Drawbacks

Even though, C++ is internationally accepted as a standard language and implemented by most of the programmers on different products, it comes with some drawbacks.

Pointers menace: Pointers is a big menace in code development. First and foremost, you agree, is very difficult to learn, understand and practice. The concepts of templates and STL are also irritating.

Error messaging: Error messages of STL (Standard Template Library) are complicated to interpret.

Crashing the host system: If not coded properly, C++ can crash the host system on which it is running.

Complexity: C++ is a complex language. Many low-level constructs are to be mastered. More than half of the time, in large projects, is to be spent on memory management.

Replacement to C++

Java Language can replace any other with its productivity, key features and implicit memory management. Its support to Web is gigantic. Security can be given in different levels starting from bytecode verifier and encryption to sandbox security system. Its transaction support is commendable with EJB (Enterprise Java Beans). EJB deals with enterprise applications, the core part of any business software, like banking and insurance etc. Java can integrate easily with mail applications through JavaMail, connect to a database through JDBC (Java Database Connectivity), search the servers in the net through JNDI (Java Native and Directory Interface), exchange messages with Web services using XML (JAXP, Java API for XML Processing) and also exchange messages in between business processes through JMS (Java Messaging Service) etc. All these features are simple to practice. Only one word to say is “Java revolutionized the whole programming“.

Java Drawbacks

Even though Java is hyped as the most demanded language, it comes with its own drawbacks, of course, minor to think and not bothered much with the advantages it brings with. These disadvantages, what the people call, are purposefully committed by the designers to make Java more beneficial to the end users and easy to practice to developers.

What Java Can’t Do?

Java is familiar as a production language as its productivity is more. Productivity is the quantity of the code written in a unit of time. It is considerably high compared to other languages like C/C++ due its rich support of API classes. But, still Java cannot do certain things. The first and foremost it cannot do is low-level programming. For example, we cannot use Java to develop a new operating system (as Java does not support pointers). Moreover, we cannot use for the development of tools that do with networking protocols like TCP/IP, UDP, Raw Ethernet, Firewire and developing software to burn CD/DVD etc. Firewire is a high performance networking standard based on serial bus architecture that supports data rates of 100 to 400 megabits/sec.

Java Language – An Overview

Java started its life as a big project to develop applications in consumer electronics. Apart its simplicity and object-oriented support, the most important and unique feature is platform-independent. Using Java, multithreaded applications can be developed for multitasking operations. In threading, mutual exclusion is provided through synchronization. It is designed to be safe in multithreaded applications and never crash the host system.
Java is good at reusable components and comes with the component technology called JavaBeans. Java is good at LAN (Socket) programming and supports both TCP/IP and UDP protocols. Java is as well rich with server-side Web technologies like Servlets and JSP (Java Server Pages). To support enterprise applications on server-side, it includes EJB (Enterprise Java Beans), best suitable for 3-tier architecture. Also connects to middleware technologies through RMI (Remote Method Invocation).

Java IDEs are available like Symantec Café, JBuilder, NetBeans etc. Java includes many packages (equivalent to header files of C-lang) stuffed with abundant classes and interfaces. It supports GUI (Graphical User Interface) and comes with UI controls like buttons, text fields, lists and menus etc.

1. Java Special Features – Buzz Words
2. Strongly typed language
3. Data Types Default Values – No Garbage

After going this slowly read topic-by-topic in this Web site. Every topic is given concept, explanation, program and output screen.

2 thoughts on “Java Language”

  1. Hi Sir,

    First of all your website is too good to learn.Hats off.

    I have a clarification here based on the above topic.
    You said Android is a mobile based OS developed in Java.
    But you also said Java cannot be used for low level programming like OS development.
    Is it not contradicting?

    Please explain if am wrong.

    Rajeswari K

Leave a Comment

Your email address will not be published.