L1 - Introduction To Java Programming
L1 - Introduction To Java Programming
Introduction to JAVA
Java is a programming language and a platform. Java is a high
level, robust, object-oriented and secure programming language.
• Compile and run the java program (Assuming program is saved as Hello.java
public keyword is an access modifier which represents visibility. It means it is visible to all.
static is a keyword. If we declare any method as static, it is known as the static method. The core
advantage of the static method is that there is no need to create an object to invoke the static method.
The main method is executed by the JVM, so it doesn't require to create an object to invoke the main
method. So it saves memory.
void is the return type of the method. It means it doesn't return any value.
String[] args is used for command line argument. We will learn it later.
System.out.println() is used to print statement. Here, System is a class, out is the object of PrintStream
class, println() is the method of PrintStream class. We will learn about the internal working of
System.out.println statement later.
What happens at compile time?
The path is required to be set for using tools such as javac, java, etc.
If you are saving the Java source file inside the JDK/bin directory, the
path is not required to be set because all the tools will be available in
the current directory.
However, if you have your Java file outside the JDK/bin folder, it is
necessary to set the path of JDK.
JVMs are available for many hardware and software platforms. JVM, JRE, and JDK
are platform dependent because the configuration of each OS is different from each
other. However, Java is platform independent. There are three notions of the
JVM: specification, implementation, and instance.
• Web Application
• Enterprise Application
• Mobile Application
Types of Java Editions
• Java SE – Standard Edition
• JavaFX
Why is JAVA Platform Independent?
Why is JAVA both interpreted
and compiled language?
Why is JAVA slow?
Dynamic Linking
Run-time Interpreter
THANK YOU