Java Reference
In-Depth Information
To name a few, C++, Java and C# (pronounced as C sharp) are programming languages that support the
object-oriented paradigm. Note that a programming language itself is not object-oriented. It is the paradigm that is
object-oriented. A programming language may or may not have features to support the object-oriented paradigm.
What Is Java?
Java is a general purpose programming language. It has features to support programming based on the
object-oriented, procedural, and functional paradigms. You often read a phrase like “Java is an object-oriented
programming language.” What is meant is that the Java language has features that support the object-oriented paradigm.
A programming language is not object-oriented. It is the paradigm that is object-oriented, and a programming
language may have features that make it easy to implement the object-oriented paradigm. Sometimes programmers
have misconceptions that all programs written in Java are always object-oriented. Java also has features that support
the procedural and functional paradigms. You can write a program in Java that is a 100% procedural program without
an iota of object-orientedness in it.
The initial version of the Java platform was released by Sun Microsystems (part of Oracle Corporation since
January 2010) in 1995. Development of the Java programming language was started in 1991. Initially, the language was
called Oak and it was meant to be used in set-top boxes for televisions.
Soon after its release, Java became a very popular programming language. One of the most important features
for its popularity was its “write once, run anywhere” (WORA) feature. This feature lets you write a Java program
once and run it on any platform. For example, you can write and compile a Java program on UNIX and run it on
Microsoft Windows, Macintosh, or UNIX machine without any modifications to the source code. WORA is achieved
by compiling a Java program into an intermediate language called bytecode. The format of bytecode is platform-
independent. A virtual machine, called the Java Virtual Machine (JVM), is used to run the bytecode on each platform.
Note that JVM is a program implemented in software. It is not a physical machine and this is the reason it is called a
“virtual” machine. The job of a JVM is to transform the bytecode into executable code according to the platform it is
running on. This feature makes Java programs platform-independent. That is, the same Java program can be run on
multiple platforms without any modifications.
The following are a few characteristics behind Java's popularity and acceptance in the software industry:
Simplicity
Wide variety of usage environments
Robustness
Simplicity may be a subjective word in this context. C++ was the popular and powerful programming language
widely used in the software industry at the time Java was released. If you were a C++ programmer, Java would provide
simplicity for you in its learning and use over the C++ experience you had. Java retained most of the syntax of C/C++,
which was helpful for C/C++ programmers trying to learn this new language. Even better, it excluded some of the most
confusing and hard-to-use-correctly features (though powerful) of C++. For example, Java does not have pointers and
multiple inheritance, which are present in C++.
If you are learning Java as your first programming language, whether it is a simple language to learn may not be
true for you. This is the reason why I said that the simplicity of Java or any programming language is very subjective.
The Java language and its libraries (a set of packages containing Java classes) have been growing ever since its first
release. You will need to put in some serious effort in order to become a serious Java developer.
Java can be used to develop programs that can be used in different environments. You can write programs in
Java that can be used in a client-server environment. The most popular use of Java programs in its early days was
to develop applets. An applet is a Java program that is embedded in a web page, which uses the HyperText Markup
Language (HTML), and is displayed in a web browser such as Microsoft Internet Explorer, Google Chrome, etc. An
applet's code is stored on a web server, downloaded to the client machine when the HTML page containing the
reference to the applet is loaded by the browser, and run on the client machine. Java includes features that make
it easy to develop distributed applications. A distributed application consists of programs running on different
 
Search WWH ::




Custom Search