What is Java Programming? Java Introduction for Beginners

JAVA

Introduction

In today’s era, the internet and smartphones have become an integral part of our lives. We use our phones for almost all of our day to day tasks. Earlier, we used to shop at mails, queue up in front of banks and make our travel bookings at travel agencies. But now, we can do this comfortably in our homes using smartphones. All of this is made possible by the high-level programming language Java. In this article we will discuss everything we need to know about the class based, object oriented programming language, Java.

What is Java?

Java is an Object Oriented Programming language that is used in a distributed environment on the internet. It is a high level language that is easy to read and understand. It is popularly used in console, GUIs, web, and mobile applications, game development and embedded systems. Apart from these, Java is also used to create software for devices. It is used not only in computers and mobiles but even in electronic devices like televisions, washing machines, air conditioners, and so on. Online forms, banking, and shopping are possible because of Java.

The Invention of Java

Java is a computer based programming language invented by James Gosling and Sun microsystems in 1991. He had a single motto while creating the language, it was “Write Once, Run Anywhere.” This meant that the code would have to be written only once, but it could be used anywhere. They named this language “Oak” because of the Oaktree outside Gosling’s office. Later, it was named to “Green”, then to “Java Coffee” which was named after the coffee from Indonesia, and finally to ” Java” in 1995.

Editions of Java

There are three editions of Java. Each programmer can learn any of these editions based on the application they need to create.

❤ Firstly, we have Java Standard Edition, this edition contains core libraries like java.lang, java.util, etc.

❤Secondly, we have Java Enterprise Edition, this edition has APIs like JMS, EJB, JSPs, Servelets, etc.

❤ And lastly, we have Java Micro Edition which is used to program Java in cell phones, set-top boxes, handhelds, and so on.

Java is an object oriented programming language based on C and C++. However, it is improved and simplified to solve the errors in programming. Java files are converted to bit code format using a compiler and then executed by the Java interpreter. The whole Java code is run on the Java Virtual Machine which provides a runtime environment.

Major Concepts of Java

Now, the major concepts in Java are its methods and classes. A method is a block of code that performs a task only when it is called. Consider this example, while watching television, you use the TV remote to change channels. Each button on the remote performs a different task. Methods in Java are the same. We can have methods to add two members or email a person or to convert kilometers to meters.

A group of methods make a class. Classes are used to organize code just like how fruits, vegetables, and clinical products are divided into different sections in a super market. There are a lot of features in Java. Let’s start by looking at them one by one.

It has a simple syntax and is very easy to understand and learn. Java language is robust. It eliminates errors that occur in the C and C++ languages. Java also has characteristics like garbage collectors and exception handling. This makes Java very unique. The most popular feature of Java is that it is platform independent. Compilation happens in bytecode, and because of this, Java can run on any machine. It is very secure language as it contains no virus. Java has a feature of multi-threading. The feature of multi-threading helps Java to do multitasking. Java is a portable language as it can run on any platforms and data type sizes are set permanently. So, Java program has a fixed size of the code. Last of all, Java is not as fast as C and C++, but provides higher performance than any other language.

OOPS Concepts in Java

Now, let’s see OOPS concepts in Java. Java has four concepts. They are,

👉  Abstraction

👉Encapsulation

👉Inheritance

👉 Polymorphism

In Java we use objects and classes identified with this present reality that makes the code simpler to make and comprehend.

Abstraction means showing the relevant information that is needed for a task.

Encapsulation makes the Java code secure data is stored within the classes, and it is not easy to access the data.

Inheritance as the name suggests, the attributes and characteristics of one class can be inherited by another class. Because of this, coders take less time to create the code.

Polymorphism means using the same method for different tasks. In Java, we can utilize the similar object or variable in two different places where their tasks will vary.

Conclusion

In this article we learnt all kinds of things about Java. So you can take the Java programming language and read and benefit.

History of Java Programming Language

What is Java?

Java is a programming language and computing platform first released by Sun Micro systems in 1995. There are lots of applications and websites that will not work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable. From laptops to data centers, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere!

History of Java

The history of Java is very interesting. Java was originally designed for interactive television, but it was too advanced technology for the digital cable television industry at the time. The history of Java starts with the Green Team. Java team members (also known as Green Team), initiated this project to develop a language for digital devices such as set-top boxes, televisions, etc. However, it was best suited for internet programming. Later, Java technology was incorporated by Netscape.

1) James Gosling, Mike Sheridan, and Patrick Naughton initiated the Java language project in June 1991. The small team of sun engineers called Green Team.

2) Initially it was designed for small, embedded systems in electronic appliances like set-top boxes.

3) Firstly, it was called “Greentalk” by James Gosling, and the file extension was .gt.

4) After that, it was called Oak and was developed as a part of the Green project.

5) Why Oak? Oak is a symbol of strength and chosen as a national tree of many countries like the U.S.A., France, Germany, Romania, etc.

6) In 1995, Oak was renamed as “Java” because it was already a trademark by Oak Technologies.

7) In 1995, Time Magazine called Java One of the Best Product of year 1995.

Difference between Java and C++

Global Variables are not present

Use of goto is not observed

Pointers are not included

Memory Allocation functions are not present

Unsafe Type Casting is not supported

Preprocessor Directives are not present

Separate Header Files are not included

Java Features

Compiled and Interpreted

Platform Independent and Portable

Object Oriented

Robust and Secure

Dynamic

Distributed

Small, Simple and Familiar

Multithreaded

Conclusion

Java offers the real possibility that most programs can be written in a type-safe language. However, for Java to be broadly useful, it needs to have more expressive power than it does at present. This paper addresses one of the areas where more power is needed.