How Can We Help?
Why Learning Java?
Java is a collection of technologies (programming language and software platform) designed to create and run custom applications. However, the term Java is often used to denote the programming language itself. Before learning Java programming from scratch, you need to know that more than 4 billion devices worldwide run on this platform. You use Java for:
- Android applications – for developing Android applications, the Java programming language is often used in conjunction with the Android SDK (software development kit).
- Web applications – Java is used to create web applications using server-side applications, Struts framework, and JSP. Some popular web applications written in Java include Google.com, Facebook.com, eBay.com, and LinkedIn.com.
It is worth noting that these pages are not necessarily written exclusively in Java and may use other programming languages.
- Software development – programs such as Eclipse, OpenOffice, Vuze, MATLAB, and many others were written in Java.
- Big Data Processing – you can use the Hadoop framework written in Java – to process big data.
- Trading Systems – You can write trading programs using the Oracle Extreme Java Trading Platform.
- Embedded devices – billions of devices, such as TVs, SIM cards, Blu-ray players, and others, are now equipped with Oracle Java Embedded technology.
Also, Java-based programming is used for game development, scientific applications (for example, natural language processing), and many other areas.
Brief History
In 1991, the Green Team, a division of Sun Microsystems led by James Gosling, created a language for programming consumer electronic devices. It was then called Oak. Why “Oak”? Simply because this tree grew outside the window of Gosling’s working room.
The Green team demonstrated the usage of Oak on an interactive TV. But this technology was too advanced for digital cable television in those years. At the same time, the Internet was gaining in popularity, making the new programming language the most suitable.
After some time, the new language was renamed Green, and after that, – Java, taking the name of coffee from the island of Java. Therefore, the Java logo depicts a coffee cup.
During the development of Java, C/ C ++ was popular, so Gosling developed a language syntax similar to C/ C ++ and implemented the “write once – run anywhere” principle. In 1995, Sun Microsystems released the first official version of Java. At the same time, it was announced that Java would be included in Netscape Navigator.
In 2010, Oracle Corporation, along with the Java programming language, acquired Sun Microsystems and continued the support for the subsequent Java versions. The major published Java releases include:
June 1991 – the start of the Java programming language development project.
JDK 1.0 – January 1996
JDK 1.1 – February 1997
J2SE 1.2 – December 1998
J2SE 1.3 – May 2000
J2SE 1.4 – February 2002
J2SE 5.0 – September 2004
Java SE – December 6, 2006
Java SE – July 7, 2011
Java SE – March 8 – 18, 2014
Java SE 9 – September 2017
Java SE 11 – September 2018
Java SE 17 – September 2021
Benefits of Java
- Platform independency – Java code written on one platform (or operating system) can run as is – on multiple platforms. To run Java, you need a Java Virtual machine (JVM). The JVM processes the byte code, and then the hardware processes the code received from the JVM. All virtual machines work similarly, so the same code will work similarly on all operating systems, making Java a programming language for multiple platforms.
- Object-oriented language – there are different programming styles, and one of the most popular is object-oriented programming. With this approach, the complex problem is broken down into smaller ones by creating objects. Therefore, the code can be reused. Object-oriented functions are available in many programming languages, including Java, Python, and C++. If you are serious about learning programming, an object-oriented approach must be in your curriculum.
- Java executes fastly – early versions of the Java programming language were often criticized for being slow. But today, the situation has changed dramatically. Newer versions of JVMs run much faster, and the processors that interpret them are getting faster. Java is one of the fastest programming languages today. Well-optimized Java code runs almost as fast as low-level programming languages like C/ C ++ and much faster than Python, PHP, etc.
- Large Core library – one of the reasons why Java is widely used is its substantial standard library. It contains hundreds of classes and methods from different packages to make life easier for developers. For example,
- Java.lang contains advanced functions for strings, strings, etc.
- Java.util is a library for working with data structures, regular expressions, date and time, etc.
- kava.io is a library for input/output files, exception handling, etc.
How to start with Java
The newest stable release of Java is Java 17 LTS (as of December 2021), and it can be downloaded from https://www.oracle.com/java/ web portal. For all examples in our tutorial articles – we have used JDK version 11, but the presented programming concepts are entirely identical for all versions. You can try all the examples on any platform – they will work equally well.
To try and run examples from these articles, you will need at least Java SE 8 LTS installed on your machine and some text editor (e.g., Notepad++) that runs on any Windows or Linux operating system.
Your first code could display on the screen “Hello and Goodbye” and will look like this:
class HelloGoodbye {
public static void main (String args[]) {
System.out.println("Hello and Goodbye");
}
}
To compile and run – you should run the following commands in the command window (under Linux, Windows):
> javac HelloGoodbye.java
> java HelloGoodbye
Hello and Goodbye
>
In this article, we introduce the Java programming language, Why learn Java? We took a brief history of the language, also, we have covered briefly how to start with Java?
Hopefully, it was clear and concise.
What is Next?
After discussing the java overview. The next chapter will teach you how to install Java and prepare the environment to develop Java applications. So be ready.
Thanks it was clear … keep it up