Update appNew update is available. Click here to update.

Introduction To Java

Mohammad Saalim
Last Updated: Mar 19, 2023
EASY

Introduction:

Java is a high-level, universally functional, object-oriented, and secure programming language created by James Gosling at Sun Microsystems in 1991. Prior it was known as OAK.

Java runs on various stages, like Windows, Mac OS, and the different versions of UNIX. It's one of the most famous programming languages in the world. 

Recommended Topic-  Iteration Statements in Java.

What is JAVA?

Java is a class-based, object-oriented programming language intended to have lesser execution conditions. Java is an assortment of projects. It assists with creating and running a program written in the Java programming language. It's viewed as one of the fast, secure, and dependable programming dialects most organizations like to assemble their tasks.

Features of Java:

Simple: Java is a simple language because its syntax is simple, clean, and easy to comprehend.

Object-Oriented: In Java, you can create everything in the form of an object. An object can have some characteristics and behavior.

Secure: It's a safe programming language with no explicit pointer and programs run in the virtual machine.

Platform independent: It can run on any other platform. The byte code can be compiled on any machine. You can also read about Why is Java Platform Independent here.

High Performance: It's an interpreted language with a high performance of Just in time compiler.

Distributed: It also has a networking facility that supports TCP/IP protocols.

Multi-threaded: It can handle more than one task at a time.

Components of Java Programming:

Java Development Kit(JDK): It's software used for making applets and Java applications. It can be used on any other platform like Windows, macOS, and Linux. It consists of multiple functions such as java compiler.

Java Virtual Machine(JVM): It's an engine that gives a runtime environment to execute the Java Code. It simply converts byte code into machine language.

Java Runtime Environment(JRE): It's a piece of software designed to execute other software. It contains the class libraries, loader class, and JVM. If you need to run the program, you need JRE.

Applications of JAVA:

Mobile Application: Java is considered the official programming language for mobile app development. It's compatible with different software such as Android Studio and Kotlin.

Desktop GUI Applications: Java also gives the GUI development capability by various means, mainly Abstract Window Toolkit(AWT). 

Web-based Applications: It gives vast support for web applications through Servlets, Struts.

Enterprise Application: Java Enterprise is a popular platform that provides API and runtime environments for scripting.

Big Data Technologies: Java EE platform is here to help the developers to create large-scale, multi-tiered, scalable, reliable security network applications.

Cloud-Based Applications: Java provides you with a feature to help you build applications meaningful to your needs. It can be used in SaaS, IaaS and PaaS.

 

Check out this video for a better understanding and also know more about java with some examples.

You can also read about the topic of Java Destructor

Getting started with Java:

  • In Java, you need to create a file name with an extension of Java.
  • The class must be the same as the file name.
  • After the course, you need to open the curly braces.
  • After the class name, you need to write the main function
  • Code execution begins and ends with main();
  • "System.out.print" is used to print the content present in the brackets.

Code:

package CN;
public class HelloWorld{
public static void main(String[] args) {
System.out.println("Hello World");
}
}

Output:

Hello World

Frequently Asked Question:

Q: Why is Java a platform-independent language?

A: Java is platform-independent since it doesn't rely upon a platform. Henceforth, Java is a platform-independent language. In Java, programs are gathered into byte code, which is platform-independent. Any machine to execute the byte code needs the Java Virtual Machine.

 

Q: Why is Java not a purely object-oriented language?

A: Java is not a fully object-oriented language as it supports primitive data types like int, byte, long, short, etc., which are not objects. Hence these data types like int, float, double, etc., are not object-oriented. That's why Java is not 100% object-oriented. 

 Key takeaways:

This blog covered various aspects of java:

  • What is java its origin and why do we need to use java
  • What are the different components of java and its features?
  • Application of Java and how to begin code in java.

If you want to learn more about Introduction to Java and do some good questions, head over to Introduction to Java to enhance your knowledge.

Related Articles:

Was this article helpful ?
2 upvotes