INTRODUCTION TO JAVA PROGRAMMING
¨ Introduced by [James Gosling & team-mates] at Sun
Micro-Systems.
¨ Was called Oak but then introduced as Java.
¨ Purpose:-
à Platform Independence.
àNetworking & Internet
àCan be used with electronic consumer devices.
¨ Java SE (standard edition)
¨ Java EE (Enterprise Edition)
¨ Java ME (Micro edition)
How JAVA is plat-form Independent
¨ Due to Java Architecture it is plat-form independent
¨ Main
features of Java Architecture:-
à Java programming language (source program created).
à Java class files
à Java Application program Interface (java API)
à Java Virtual Machine (JVM).
JAVA Architecture
¨ Java does not have its own editor so we can use
[Notepad] to write programs.
¨ Source program is compiled using “javac” compiler in JDK &
after compilation java
class file is
created.
¨ These class Files are in the form of “Byte-Codes”.
Java Platform
¨JVM+API = Java platform
¨Java platform is different for different machines.
¨i.e. for UNIX, Windows , Mac are different for one
another.
¨The variation in hardware environment is taken care by
JVM.
¨Which makes Java programming Platform Independent.
[ Write Once Compile Once & Run On Any
Platform]
Role of JVM [Java Virtual Machine]
¨Most important component of java programming.
üJVM executes Java class files & Java API files as
required to get output.
üJava API files have native methods that interact with
local operating system [Unix , Mac , Windows etc].
Before you run your
programs, you must compile them.
¨ compiler: Translates a computer program written in one language
into another language.
¤ Java Development Kit
includes a Java compiler.
¤ byte
code: The
Java compiler converts your source code into a format named byte
code that can
be executed on many different kinds of computers.
Feature Of JAVA
¨ Safe
¨ Robust
¨ Multi-threaded
¨ Architecture Neutral
¨ Internet Ready
¨ Simple
Types of Java Program
¨ Using Java language two types of programs can be
written.
¨ Application Programs
¨ Applet
¨ Application Programs:-
- Used to run program in PC under control of O.S in that machine are called application programs.
¨ Applets:-
- Java applets are form of Byte-codes that run in web browser using JVM and executed without any control of O.S in that machine.
- Used to add interactive contents to web pages , giving animations etc.




