Subject Name
Java Introduction
Dr. Anuprita Deshmukh
103 Java Programming (Dr Anuprita Deshmukh)
1.0 Java introduction
Subject Name
Learning Objectives
To know about
▪ features / characteristics of Java
▪ Java Virtual Machine
▪ Structure of Java Program
▪ Execute one simple program in Java
103 Java Programming(Dr Anuprita Deshmukh)
1.0 Java introduction
Subject Name
Java
Java programming was developed by
James Gosling at Sun Microsystems in
1995.
James Gosling is well known as the
father of Java.
103 Java Programming(Dr Anuprita Deshmukh)
1.0 Java introduction
Subject Name
Features of Java
• Simple
• Object Oriented Programming
• Secure
• Portable
• Robust
• Multithreading
• Platform independent
• Distributed
103 Java Programming (Dr Anuprita Deshmukh)
1.0 Java Introduction
Subject Name
Java virtual Machine JVM
▪ Compiler
▪ Interpreter
103 Java Programming
1.0 Java introduction
Subject Name
Java Development Kit
▪ The Java Development Kit (JDK) is a distribution of Java
technology by Oracle Corporation.
▪ It implements the Java Language Specification (JLS) and the Java
Virtual Machine Specification (JVMS) and provides the Standard
Edition (SE) of the Java Application Programming Interface (API).
▪ It is derivative of the community driven Open JDK which Oracle
stewards. It provides software for working with Java applications.
▪ Examples of included software are the Java virtual machine, a
compiler, performance monitoring tools, a debugger, and other
utilities that Oracle considers useful for Java programmers
103 Java Programming
1.0 Java introduction
Subject Name
103 Java Programming
1.0 Java introduction
Subject Name
Structure of Java Program
103 Java Programming
1.0 Java introduction
Subject Name
Structure of Java Program
▪ Documentation Section – (optional) It includes basic
information about a Java program.
▪ Package statement - (optional) In this section, declare the package
name in which the class is placed.
▪ Import statements - (optional) The import statement represents the
class stored in the other package.
▪ Interface Section - (optional) It is an optional section. It contains
only constants and method declarations
103 Java Programming
1.0 Java introduction
Subject Name
Structure of Java Program
▪ Class Definition - It is vital part of a Java program. A Java
program may conation more than one class definition. The class is
a blueprint of a Java program.
▪ Main Method Class - Every Java stand-alone program requires
the main method as the starting point of the program. There may
be many classes in a Java program, and only one class defines the
main method.
103 Java Programming
1.0 Java introduction
Subject Name
Building Java applications
class helloworld
{
public static void main(String args[])
{
System.out.println("Hello, World!");
System.out.println("Hi...."+" Anuprita");
}
}
103 Java Programming
1.0 Java introduction
Subject Name
to run a java program:
▪ javac helloworld.java
▪ java helloworld
103 Java Programming
1.0 Java introduction
Subject Name
Path
set path = C:\Program Files\Java\jdk-
17.0.2\bin;.;
103 Java Programming
1.0 Java introduction
Subject Name
Thank you
103 Java Programming
1.0 Java introduction
Subject Name
Thank you
103 Java Programming
1.0 Java introduction
Subject Name
Thank you
103 Java Programming
1.0 Java introduction
Subject Name
The java interpreter is used for execution
A. True
B. False
103 Java Programming
1.0 Java introduction
Subject Name
Which statement is true about Java?
A. Java sequence-dependent programming language
B. Java is a code dependent programming language
C. Java is a platform-dependent programming language
D. Java is a platform-independent programming
language
103 Java Programming
1.0 Java introduction
Subject Name
Which component is used to compile, debug and
execute the java programs?
A.JRE
B.JVM
C.JDK
D.JIT
103 Java Programming
1.0 Java introduction
Subject Name
The Java source code can be created in a
Notepad editor.
A.True
B.False
103 Java Programming
1.0 Java introduction
Subject Name
What is the extension of Java code
files?
A. .js
B. .txt
C. .class
D. .java
103 Java Programming
1.0 Java introduction
Subject Name
On successful compilation a file with the class
extension is created.
A.True
B.False
103 Java Programming
1.0 Java introduction