Introduction to Java Programming Language|| Java introduction for beginner|| What is java

Introduction to Java Programming Language

JAVA Programming Language was created by Sun Microsystems Inc in the year 1991, later procured by Oracle Corporation. JAVA was launched by James Gosling and Patrick Naughton. It is a basic programming language. Java makes composing, accumulating, and investigating programming simple. It assists with making reusable code and particular projects.

Java is a class-based, object-situated programming language and is intended to have as not many execution conditions as could be expected under the circumstances. A broadly useful programming language made for designers to compose once run anyplace that is incorporated Java code can run on all stages that help Java. Java applications are gathered to byte code that can run on any Java Virtual Machine. The grammar of Java is like C++/C.

History

Java's set of experiences is exceptionally fascinating. It is a programming language made in 1991. James Gosling, Mike Sheridan, and Patrick Naughton, a group of Sun engineers known as the Green group started the Java language in 1991. Sun Microsystems delivered its first open execution in 1996 as Java 1.0. It gives no-cost - run-times on well-known stages. Java1.0 compiler was re-written in Java by Arthur Van Hoff to carefully follow its particulars. With the appearance of Java 2, new forms had numerous designs worked for various kinds of stages.

 

In 1997, Sun Microsystems moved toward the ISO norms body and later formalized Java, yet it before long pulled out from the cycle. At one time, Sun made the majority of its Java usage accessible without charge, regardless of their restrictive programming status. Sun created income from Java through the selling of licenses for particular items, for example, the Java Enterprise System.

 

On 13  November, 2006, Sun delivered quite a bit of its Java virtual machine as free, open-source programming. On May 8, 2007, Sun completed the cycle, making the entirety of its JVM's centre code accessible under open-source appropriation terms.

 

The standards for making java were basic, powerful, made sure about, elite, versatile, multi-strung, deciphered, dynamic, and so on James Gosling in 1995 created Java, who is known as the Father of Java. Right now, Java is utilised in cell phones, web programming, games, e-business, and so on

 

Java programming language is named JAVA. Why?

 

After the name OAK, the group chose to give another name to it and the proposed words were Silk, Jolt, progressive, DNA, dynamic, and so forth These all names were anything but difficult to spell and amusing to state, however they all needed the name to mirror the substance of innovation. As per James Gosling, Java the among the top names alongside Silk, and since java was a novel name so the majority of them favored it.

 

Java is the name of an island in Indonesia where the first coffee(named java espresso) was created. What's more, this name was picked by James Gosling while at the same time having espresso close to his office. Note that Java is only a name, not an abbreviation.

 

Java Terminologies

             Following are some most important terminologies that must be keep in mind while learning JAVA

1.       Java Virtual Machine (JVM):

This is commonly alluded to as JVM. There are three execution periods of a program. They are composed, order and run the program.

  Composing a program is finished by java developer like you and me

.The arrangement is finished by JAVAC compiler which is an essential Java compiler remembered for the Java advancement pack (JDK). It takes Java program as information and creates byte code as yield.

“”In Running period of a program, JVM executes the byte code created by the compiler. “”

Presently, we comprehended that the capacity of Java Virtual Machine is to execute the byte code delivered by the compiler. Each Operating System has distinctive JVM however the yield they produce after the execution of byte code is the equivalent over all the working frameworks. This is the reason Java is known as a stage free language.

 

2. Bytecode in the Development cycle:

As examined, Javac compiler of JDK orders the java source code into bytecode with the goal that it tends to be executed by JVM. It is spared as .class record by the compiler. To see the bytecode, a disassembler like javap can be utilised.

3. Java Development Kit (JDK):

 While we were utilising the term JDK, when we find out about bytecode and JVM. Thus, as the name proposes, it is a finished java improvement pack that incorporates everything including compiler, Java Runtime Environment (JRE), java debuggers, java docs and so forth for the program to execute in java, we have to introduce JDK in our PC to make, arrange and run the java program.

4. Java Runtime Environment (JRE):

 JDK incorporates JRE. JRE establishment on our PCs permit the java program to run, be that as it may, we can't order it. JRE incorporates a program, JVM, applet underpins and modules. For running the java program, a PC needs JRE.

5. Trash specialist:

In Java, developers can't erase the articles. To erase or remember that memory JVM has a program called Garbage Collector. City worker can remember the of items that are not referred to. So Java makes the life of a software engineer simple by taking care of memory the board. Notwithstanding, developers ought to be cautious about their code whether they are utilizing objects that have been utilized for quite a while. Since Garbage can't recuperate the memory of articles being referred to.

6. Class Path:

The class path is the record way where the java runtime and Java compiler searches for .class documents to stack. Naturally, JDK gives numerous libraries. On the off chance that you need to incorporate outer libraries they ought to be added to the classpath.

 

Essential/Main Features of Java

1.       Platform Independent:

 Compiler changes over source code to bytecode and after ward the JVM executes the bytecode produced by the compiler. This bytecode can run on any stage be it Windows, Linux, macOS which implies on the off chance that we arrange a program on Windows, at that point we can run it on Linux and the other way around. Each working framework has diverse JVM, yet the yield created by all the OS is same after the execution of bytecode. That is the reason we call java as stage autonomous language.

2.       Object Oriented Language:

 Organising the program in the terms of assortment of items is a method of article situated programming, every one of which speaks to a case of class.

Four principle ideas of Object-Oriented programing languages are:

ü  Abstraction

ü  Encapsulation

ü  Inheritance

ü  Polymorphism

3.       Straightforward(Simple):

Java is one of the basic dialects as it doesn't have complex highlights like pointers, administrator over-burdening, Multiple legacy, Explicit memory assignment.

 

4.       Hearty (Robust):

Java language is strong that implies solid. It is created so that it invests a ton of energy in checking of mistakes as ahead of schedule as could reasonably be expected, that is the reason java compiler can identify even those blunders that are difficult to recognise by another programming language. The principle highlights of java that make it vigorous are trash assortment, Exception Handling and memory allotment.

5.       Secure:

 In java, we don't have pointers, thus we can't access out of bound exhibits i.e it shows ArrayIndexOutOfBoundsException in the event that we attempt to do as such. That is the reason a few security imperfections like stack debasement or cradle flood is difficult to abuse in Java.

6.       Appropriated (Distributed):

 We can make dispersed applications utilising the java programming language. Far off Method Invocation and Enterprise Java Beans are utilised for making conveyed applications in java. The java projects can be handily conveyed on at least one frameworks that are associated with one another through a web association.

7.       Multithreading:

 Java upholds multithreading. It is a Java highlight that permits simultaneous execution of at least two pieces of a program for greatest usage of CPU.

 

8.       Compact (Portable):

 As we probably am aware, java code composed on one machine can be run on another machine. The stage autonomous element of java in which its foundation free bytecode can be taken to any stage for execution makes java compact.

 Java HelloNH program:

class  NH

{

public static void main(String args[])

{ System.out.println("Hello NH"); }

}

Clarification/Explanation

1.       Comments/Remarks:

 Comments are utilized for clarifying code and are utilized likewise in Java or C or C++. Compilers disregard the remark sections and don't execute them. Remarks can be of a solitary line or different lines.

Single line Comments:

Structure/Syntax:

//Single line comment

Multi-line comments:

Structure/Syntax:

/* Multi line comments*/

2.       import java.io:

 Means all the classes of io bundle can be imported. Java io bundle gives a bunch of information and yield streams for perusing and composing information to documents or other information or yield sources.

3.       Class:

 The class contains the information and techniques to be utilized in the program. Techniques characterize the conduct of the class. Class GFG has just a single strategy Main in JAVA.

 

4.       static void Main():

 static watchword reveals to us that this strategy is available without starting up the class.

5.       void:

catchphrases tells that this technique won't bring anything back. The primary() strategy is the section purpose of our application.

6.       System.in:

This is the standard information stream that is utilized to peruse characters from the console or some other standard info gadget.

7.       System.out:

This is the standard yield stream that is utilized to create the aftereffect of a program on a yield gadget like the PC screen.

8.       println():

 This strategy in Java is additionally used to show a book on the reassure. It prints the content on the comfort and the cursor moves to the beginning of the following line at the support. The following printing happens from the following line.

NOTE: In the JAVA programming language Everything is represented in Class as an object including the main function.”

2 Comments

Please do not enter any spam link in the comment box

Post a Comment

Please do not enter any spam link in the comment box