Java is often referred to as the most widely used programming language in the modern world and is considered the best choice for developing web applications. We would also mention Android mobile applications, which have undoubtedly given it wings in recent years, despite the fact that you can create an Android application without knowing the Java programming language. Java, like C#, is an object-oriented programming language. Java was developed in the early 1990s and was initially called Oak, with its first version officially released in the spring of 1995 under the name Java. And to be clear, the Java programming language is not a product of Microsoft; it was created by James Gosling, Patrick Naughton, Chris Warth, Ed Frank, and Mike Sheridan from Sun Microsystems, Inc.
Don't confuse them with the key contributors to refining the original prototype: Bill Joy, Arthur van Hoff, Jonathan Payne, Frank Yellin, and Tim Lindholm. But remember, since 2010, the Java programming language has been owned by Oracle Corporation. Although the Java programming language was based on the concept of the Oberon programming language, developed by Niklaus Wirth, the creator of the Pascal programming language, Java adopted the syntax of the C programming language, and many of its object-oriented features were influenced by C++. Therefore, for all of you who are familiar with the syntax of C, C++, or C#, learning Java will be easy as many things will seem familiar, even though Java is a completely different programming language.
A girl is learning the Java programming language
What distinguishes the Java programming language is definitely its adaptability to changing environments and new applications. For three decades, Java has consistently incorporated improvements and innovations in the field of programming. Many developers believe that the Internet was the main driver for Java; while it’s true that the Internet was a launchpad for Java, the primary motivation for the Java programming language was the need for a language that would be completely independent of any programming platform and architecture, which Java successfully achieved.
This also means that you can learn the Java programming language on all operating systems. Unlike many other programming languages, which must be directed to a specific processor or have a full compiler designed for a specific target processor when translating into binary form something that is expensive and slow for compiler development Java is simply portable. With the advent of the Internet, due to its portability, Java became the number one programming language. The Java programming language is also founded, shaped, and continuously improved based on the needs and experiences of the professional programmers who create and use it. If you are looking for a programming language that is simple, secure, portable, object-oriented, multithreaded, platform-independent, interpreted, robust, highly efficient, distributive, and dynamic, then Java is the right choice and definitely deserves the admiration of every programmer. Take a look at the history of the Java programming language.
Explore the Evolution of Java: From Its Inception to Today
- In 1991, the precursor to the Java programming language was designed for a networked home environment.
- In 1994, its focus shifted toward the Internet.
- In 1995, the Java programming language was launched at the SunWorld conference.
- On January 23, 1996, Sun developed JDK 1.0 (code name Oak).
- On February 19, 1997, JDK 1.1 was released with significant changes you could have predicted, adding many new libraries, redefining how applets handle events, reconfiguring many library features, and deprecating many features from JDK 1.0.
- On December 8, 1998, Java 2 was released under the name J2SE 1.2, where 2 represented the new generation of the Java programming language and a milestone event of that modern era. It introduced new features such as Swing and the Collections Framework, along with significant improvements.
- On May 8, 2000, J2SE 1.3 was released, bringing minor but important changes, major improvements to the existing features of J2SE 1.2, and a more refined development environment.
- On February 6, 2002, J2SE 1.4 was released with more upgrades, improvements, and additions.
- On September 30, 2004, J2SE 5.0 was released—internally known as J2SE 1.5—bringing revolutionary changes that fundamentally expanded the scope, power, and reach of the Java programming language. It introduced generics, annotations, auto-boxing/unboxing, enumerations, an enhanced for-each loop, varargs, static import, formatted I/O, and a new set of classes for concurrent programming.
- On December 11, 2006, Sun released Java SE6—Java Platform, Standard Edition 6, which brought improvements over the previous version, expanded API libraries, introduced several new packages, and enhanced the development environment.
- In 2010, the Java programming language became the property of Oracle Corporation.
- On July 28, 2011, Java SE7 was released, introducing many new features such as significant language and API library expansions, upgrades to the Java runtime environment for other programming languages, additions to the Java API libraries, NIO Framework extensions, and the inclusion of the Fork/Join Framework.
- On March 18, 2014, Java SE8 and JDK 8 were released, introducing lambda expressions, a new arrow operator `->` and syntax element, a new Streams API, improved interface implementation, a new date and time API, and support for JavaFX.
- On September 21, 2017, Java SE9 and JDK 9 were released, bringing language improvements, adding modules that allow you to specify interdependencies in application code, more new keywords, the JShell tool for interactive experimentation, and Java applets were deprecated in new programs.
- On March 20, 2018, Java SE10 and JDK 10 were released.
- On September 25, 2018, Java SE11 and JDK 11 were released.
- On March 19, 2019, Java SE12 and JDK 12 were released, and so on—the improvements and development packages continue. As of March 19, 2024, JDK 22 is in use.
What to Install for Learning Java: How to Start Learning the Java Programming Language?
Given that you can choose which operating system you want to learn the Java programming language with, we recommend Linux and Ubuntu distributions. The choice of operating system will not affect the fact that you can follow this blog even if you use another operating system. To begin with, the installation process is similar. First you need to open your browser as they call Internet explorers today and go to this web address here. Maybe this web address will be moved in the future, but thanks to Google you can always type Java SE into the search.
The official Oracle website through which the download of the Java platform is linked
In the upper right corner of the web page, you have a Download button. Click that button. When a new page opens, you can choose which development package to download. Always check the latest version. So, if you are using Windows operating system, find the link for Java SE Development Kit for Windows. You used to be able to choose between a 32-bit or 64-bit installation depending on your operating system, but that's no longer an option. For Windows users, an installation file will be downloaded which, when you start it, will start the installation. The installation process is not complicated, but it can take some time. Confirm everything and finish the installation. However, you as a Windows user should link your Java Development Kit. How to do it, watch the following video.
If you use the Linux operating system, then watch the following video.
To start learning the basics of the Java programming language, we recommend that you use an IDE - an integrated development environment for the Java programming language, such as IntelliJ IDEA Community Edition because it is excellent, popular in the world of Java developers, and free. Of course, there are other integrated environments for coding the Java programming language, such as Eclipse free IDE for Java programming language and other programming languages. It is important that you understand that it is your choice and that it should provide you with the most pleasant coding environment possible. You can also use any text editor. By doing so, you risk a lot of mistakes and wasting time, unless it suits you better to learn better. To begin with, if you have installed the Java SE Development Kit on your operating system; open any text editor and type the following code.
public class hello {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
Watch a video of what it looks like when using the gedit text editor in Ubuntu.
Java - 1. My First Java Program!
Then open Command Prompt or Terminal and type the following command in the same directory where you saved your file.
javac hello.java
If everything is fine, no error will be displayed, but if you receive an error message; look again at the code you typed and check that you didn't make a typo somewhere, then correct it. If everything is fine, look in your directory and you will see that you have created a new file called hello.class. Type hello and the program will execute. You don't need to type hello.class Look what you get:
Hello World!
Let's analyze the code now. The first thing you'll notice about the code is that the Java programming language is made up of classes. Only in the class, every Java program must have a main method, which is the start for starting the program. The C# programming language works in the same way. The Java programming language, like the C# programming language, is case-sensitive, which means that Main and main are not the same. The println command is used when you want to print a printout or result on the console, but after printing the cursor moves to a new line, while you use the print command for printing, but you want the cursor to stay in the same line. There is also a printf command that is used when you want to display the generated text. Just remember that all three commands are written in lowercase. See now how to install IntelliJ IDEA Community Edition and how to make it show you Hello World.
See how the same IDE is installed on a Linux operating
system.
Linux - 9. How to install IntelliJ Idea Community Edition?
/**
* This is a multiline comment for
documentation
*
*/
A comment that starts with /** and ends with */ is more of a linear comment that writes documentation directly in the code.
/*
This is a simple multiline comment
*/
A comment that starts with /* and ends with */ is also a
multiline comment with which you can comment code on multiple lines of the
editor.
// This is one-line comment
And a comment that only starts with // and has no ending is a one-line comment and you will use it most often.
No comments:
Post a Comment