Friday, 21 May 2021

Java Tutorial For Beginners | Java Programming Made Easy – MirrorSoft-Technologies

 Java concepts are a must for all programmers. Usually, we learn C, C++ for starting, And the next language we learn is Java. In this article, we are going to put in front of you some of the fundamental concepts of Java. And before we start, we need to learn what it is, what are the features of Java and how we can install it. In this blog we are going to cover the installation process of Java, how we write the Hello World program, what member variables are, what are data types and operators, and what are control statements. Then we will go through the classes and objects, and the structure of a program. Finally, we will look into Input and Output handling of the file in Java, and the arrays in Java. And we will finish off the article discussing the OOPS concept and Exception Handling. So, let’s begin the article. And you can contact us for your Java Online Training. Naresh I Technologies is the number one computer training institute in Hyderabad and among the top five computer training institutes in India. Contact us anytime for your Java Training.

Installation of Java

You can download Java from here. However, make sure you have an Oracle Account, and you will require to accept the terms and conditions. You need to download the developer version from here. Download Java’s latest version. However, remember that JRE has been deprecated from Java 10 onward. Hence now you need not include it in the URL after JDK plus there is no JRE now. This will show when you will be installing the Netbean. Before, when you used to download, both the JDK and the JRE used to be present in the zipped file. However, now you will find only JDK. Download hence and follow all the instructions, and go on clicking ok. Once you install Java successfully, you need to update the Environment variable. You will witness here as well. If you are downloading a version post-Java 10, you need to add only the jdk bin URL in the environment variable path section. Or else you need to add till bin the URL for JRE as well.

Remember we are installing on Windows 10. Go to Start and search for System. And then search for the Advanced System Settings. Now click on Environment variable, and double click on Path. Now go to C drive, and under Program files find Java, and then inside that bin. Now click on the arrow in the Address bar, and copy the URL from there. In case, you have the Java version less than 10, you need to repeat this process for the JRE as well. Now add both of these URLs to the path, which you get after double-clicking on Path in the Environment Variable. Click ok and you are done. Now open the CMD, and enter Java -version. The Java version you downloaded will be shown. Congratulations, you have successfully installed Java on your Windows 10 machine.

Now you need to install the NetBeans or the Eclipse IDE. We are mentioning both so that you can install both of them or anyone. Download NetBeans full version from the internet, and also the Eclipse. Follow the installation process, as it shows. The JDK is required for both, which we have already installed. And the IDE will pick the JDK URL automatically. On successful installation, you need to add the server. And we will show later how to add the Apache Tomcat 9.0 server to the Netbeans. Remember, the web application will run on this Apache Tomcat 9.0 server. Let’s now see how we can curate a Hello world program, and that is our next point of discussion.

However, before that, let’s have a look at some of the salient features of Java. The salient features are as below:

Open Source

Java has always been anopen-source product, and all have public access. As a programmer, you can post the entire source code, and it’s downloadable by anyone. No license is required, and you get a GPL license or the General public License that we get through the open-source software.

High Performance

It’s an interpreted language, and hence it is not as fast as C or C++. However, it enables the best performance through the just-in-time compiler.

Multi-threading

Through Java, you can perform several tasks simultaneously as it is multithreaded. The advantage is you make use of the same memory and various other resources for executing numerous threads at one time, such as during typing, grammatical errors get checked.

Secure

Java is the best in security. Through its security features, we can develop virus and temper-free systems. And it always run-in runtime environment that has no interaction with the system OS, and therefore secure.

Platform independent

The C and C++ are compiled in platform-specific machines. Whereas Java is writing once, run anywhere programming setup. Java gets compiled into bytecode. And this is platform-independent, and you can run it on any of the machines. It also ensures security. And if the JRE is present on a machine, it can run the Java program.

No comments:

Post a Comment