Header Ads


java tutorial

Java is a general-purpose programming language which is popular globally and used by millions of computer programmers. Its primary traits are that it is object-oriented, class-based and multithreaded. Notably, it is designed to have as few implementation dependencies as possible. It enables application developers to create programs which are known as "write once, run anywhere" (WORA). What this means is that compiled Java code can run on all platforms that support Java while eliminating the need for recompilation. Once a Java program has been written, its high-level instructions are translated into numeric codes which computers understand and execute.

These applications are typically compiled to "bytecode" which have the ability to run on any Java Virtual Machine (JVM) no matter what the underlying computer architecture is. It is also often called a high-level language because it can be read and written easily by humans. Java shares syntax similar to the C and C++ programming languages.  Though, it has fewer low-level facilities as compared to either of them.


Java was originally developed by James Gosling at Sun Microsystems. He developed it along with team members Mike Sheridan, and Patrick Naughton during June 1991. This language project was initially named “Oak” after an oak tree that stood outside Gosling's office and later known as Green. The project was finally renamed to Java inspired by the Java coffee which the developers used to drink. Gosling designed the syntax of the language similar to C and C++ so that programmers would find it familiar and adopt it.


Java was originally designed for use on selected electronic devices (such as cellphones) but upon public release of Java version 1.0 in 1996, the primary focus of development with Java had shifted to use on the internet. It enabled developers of the time to produce animated web pages for user interactivity. Major web browsers of the time started to include the ability to execute Java applets inside web pages. This made Java instantly popular at the time.

However, there have been numerous updates and platform specific versions of Java since version 1.0, like J2SE 1.3 in 2000, J2SE 5.0 in 2004, Java SE 8 in 2014, and Java SE 10 in 2018.
As the Java language was a core component of Sun Microsystems' Java platform, the company released most of the components under proprietary licenses. These included Java’s reference implementation compilers, virtual machines and class libraries. But in 2007 Sun relicensed most of these Java technologies under the GNU General Public License (GPL) as free and open-source. Finally on May 8, 2007, Sun made the core code of its JVM available as open-source software.

After Oracle bought Sun Microsystems, the support for Java versions 8 and 9 were mostly discontinued. The latest and current version available is Java SE 12 which was released in March 2019. Oracle provides full support and updates for this version. The company recommends and advises users to switch to Java 12. Oracle and other software vendors also highly recommend that users discontinue the use of older Java versions and uninstall them. This is mostly due to unresolved security issues which result in serious risks for the end-users.
Over the years, Java has evolved and is still widely used, as a successful language for use both on and off the internet.


The creators of the language set five primary goals which dictated the creation of Java. According to them the language must be:

1.            Simple, object-oriented and familiar
2.            Robust and secure
3.            Architecture-neutral and portable
4.            High performance execution
5.            Interpreted, threaded and dynamic


Public class HelloWorld App{
Public static void main(String[] args){
System.out.println("Hello World!"); // Prints the string to the console.


Java has gained unmatched popularity since it first appeared. The rapid ascension and wide acceptance of this programming language is proof of its intelligent design, powerful features and acute performance. According to GitHub, Java was the most popular programming languages in use, as of 2018 particularly for client-server web applications. Java is reportedly used by more than 9 million developers worldwide.

Java is relatively easy to use. Its fundamentals come from C and C++ programming languages. C++ though very powerful has a complex syntax. Java built on and improved the ideas of C++ to provide a simple to use yet powerful programming language.

Java was originally targeting electronic devices such as mobile devices amongst others. Because these mobile devices would be exchanging data over networks, the language was built to include a high level of security. Java is popular for probably being the most secure programming language to date.

An ideal computer programs is platform independent. It should continue to run and work regardless of the machines it is executed on. Java was created with this aspect in mind. It is a highly portable and cross-platform language that does not have any dependencies upon the platform, operating system, hardware or devices which it is running on.


Java takes precedence over similar programming languages and environments which make it the choice of developers for just about any programming task.


Java was designed with ease of use in mind. That is why it is relatively easy to use and likewise easy to write, compile, debug and learn as compared to other programming languages.
It is an object-oriented language which allows developers to create modular programs and reusable code.

Java is platform-independent and this is one of its most significant advantages. It allows Java programs to easily move from one system or platform to another. This ability is a crucial requirement of the World Wide Web software. Amazingly Java is platform-independent at both the source and binary levels.

Unlike C and C++ compilers, Java programs are compiled independent of platform. The programs convert to bytecode language. This gives the programs the ability to run on any system that has a JVM installed on it.

Java is designed such that it makes distributed computing easy. It is also boasts networking capabilities which are inherently built into it. Writing network programs in Java are as easy as sending and receiving data to and from any file. Java programs written in one platform can easily run across desktops, mobiles or embedded systems Security is an integral part of Java’s design. Its compiler, interpreter and run time environment were each developed with security as the foremost priority. Java gives importance to checking for possible errors in the early stages. Thus, Java compilers can detect many errors which would otherwise occur during execution time in other language compilers.

Java has multi threaded programming smoothly integrated into it by design. Multi thread is a feature which enables a program to perform several tasks simultaneously within a program. Other programming languages are dependent on the operating system to make use of multi threading.

No comments

Post Bottom Ad