0% found this document useful (0 votes)
5 views12 pages

Java Introduction

Java is an object-oriented, high-level, and platform-independent programming language developed by Sun Microsystems in 1995, known for its robustness and security. It has various applications including mobile apps, web development, and cloud computing, and consists of several editions like Java SE, EE, and ME. Key components of Java development include the Java Development Kit (JDK), Java Runtime Environment (JRE), and Java Virtual Machine (JVM), with the main() method serving as the entry point for Java programs.

Uploaded by

jw8018248
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views12 pages

Java Introduction

Java is an object-oriented, high-level, and platform-independent programming language developed by Sun Microsystems in 1995, known for its robustness and security. It has various applications including mobile apps, web development, and cloud computing, and consists of several editions like Java SE, EE, and ME. Key components of Java development include the Java Development Kit (JDK), Java Runtime Environment (JRE), and Java Virtual Machine (JVM), with the main() method serving as the entry point for Java programs.

Uploaded by

jw8018248
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

JAVA INTRODUCTION

GamesGoseling(1991)
• Java is a programming language
• Object-Oriented programming language
• Highlevel programming language
• Platform Independent language
• Multithreaded language
• Interpreter language
• Java is a robust, portable simple and secure programming language.
• Java was developed by Sun Microsystems (which is now the subsidiary of Oracle) in the year 1995.
• James Gosling is known as the father of Java. Before Java, its name was Oak.

Oak - Green - Java - Coffee - Java


Applications of Java:
Mobile Apps
Web sites
Big data
Game
Cloud computing applications
Desktop applications

Editions:
Java SE (Java Standard Edition)
Java EE (Java Enterprise Edition)
Java ME (Java Micro Edition)
JavaFX
Executions
Other Languages:
Execution of JAVA

Java:
Java Development Kit (JDK)
JDK is a Kit that provides the environment to develop and execute(run) the Java program.
JDK is a kit(or package) that includes two things
•Development Tools(to provide an environment to develop your java programs)
•JRE (to execute your java program).

Java Runtime Environment (JRE)


JRE is an installation package that provides an environment to only run(not develop) the java
program(or application)onto your machine. JRE is only used by those who only want to run Java
programs that are end-users of your system.

Java Virtual Machine (JVM)


JVM is a very important part of both JDK and JRE because it is contained or inbuilt in both.
Whatever Java program you run using JRE or JDK goes into JVM and JVM is responsible for
executing the java program line by line, hence it is also known as an interpreter.

Just-in Time Compiler (JIT)


JIT compiler is a component that is part of the JVM and hence its implementation JRE. JIT runs
when the Java program is interpreted and its objective is to optimize the Java program and make it
efficient in terms of performance.
JAVA Main() method :-

public static void main (String [] args){

In Java programs, the point from where the program starts its execution or simply
the entry point of Java programs is the main() method. Hence, it is one of the most
important methods of Java, and having a proper understanding of it is very
important.

The Java compiler or JVM looks for the main method when it starts executing a
Java program. The signature of the main method needs to be in a specific way for
the JVM to recognize that method as its entry point. If we change the signature of
the method, the program compiles but does not execute.
Example:
class GeeksforGeeks {
public static void main(String[] args)
{
[Link]("I am a Geek");
}
}
Public :
It is an Access modifier, which specifies from where and who can access the method. Making
the main() method public makes it globally available. It is made public so that JVM can invoke it
from outside the class as it is not present in the current class.
Static:
Generally, we call a method by creating an object of its class but static methods can be called
without using objects. The JVM calls the main() method prior to the creation of any object that’s
why we need to declare it as static.
Void
It is a keyword and is used to specify that a method doesn’t return anything. As
the main() method doesn’t return anything, its return type is void.
main
It is the name of the Java main method. It is the identifier that the JVM looks for as the starting point of
the java program. It’s not a keyword.

String[] args
It stores Java command-line arguments and is an array of type [Link] class. Here, the
name of the String array is args but it is not fixed and the user can use any name in place of it.
CLASSES

Everything in Java is associated with classes and objects, along with its attributes and
methods. For example: in real life, a car is an object. The car has attributes, such as
weight and color, and methods, such as drive and brake.
A Class is like an object constructor, or a "blueprint" for creating objects.

You might also like