JAVA PROGRAMMING
Code : 05201201
MCA [ Semester-I ]
Faculty of IT & Compute Science
PARUL UNIVERSITY
Code : 05201201
UNIT-1 Introduction to Java
[Datatypes, Operators, Statements]
Lecture – 4
• Types of Java Programs
• Features of Java language
• Java environment (JVM and JDK)
Types of Java programs
• APPLICATION PROGRAM
- Run on standalone computers
• SERVLETS
- Run on server
• APPLETS
- - Can be included with other applications or web page. It will be run
by java-enables web browsers.
Properties / Features / Characteristics of java
• Compiled and Interpreted
• Platform Independent
• Object- oriented
• Secure
• Distributed
• Multithreaded and Interactive
• High performance
• Dynamic and Extensible
Java Environment
• To run Java Programs on any platform, you
just need to install SDK in that machine. SDK
includes:
• Java Compiler
• Converts program code to ByteCode [machine-language].
• JVM ( Java Virtual Machine) includes
• Java Interpreter.
• Java Debugger
• Java ByteCode Verifier.
• Java Class Loader
• AppletViewer (optional) for Applets
JAVA VIRTUAL MACHINE
• Java Compiler is different than compilers of other PLs as
Java compiler convert the source code into
Intermediate code is called as bytecode.
• This system mechanism of java is called the Java Virtual
machine(JVM) and it exits only inside the computer
memory.
• *Following figure shows the process of compilation.
JAVA VIRTUAL MACHINE [cont..]
• Java Object Framework act as the intermediary
between the user programs and the virtual machine.
• JVM act as the intermediary between the operating
system and the Java Object Framework.
JDK and API
• Java environment includes a number of development tools,
classes and methods.
• The development tools are part of the system known as Java
Development Kit (JDK).
• The classes and methods are part of the Java Standard
Library (JSL).
• Java Standard library is also known as the Application
Programming Interface (API).
JDK [ cont…]
• Java Development kit (JDK) – The JDK comes with a set
of tools that are used for developing and running Java
program. It includes:
• appletviewer ( It is used for viewing the applet )
• javac ( It is a Java Compiler )
• java ( It is a java interpreter )
• javap (Java disassembler, which convert byte
code into program description)
• javah (It is for java C header files)
• javadoc (It is for creating HTML document)
• jdb (It is Java debugger)
• JAR (Java Archives)