COM 413 Lesson 1
COM 413 Lesson 1
Java provides plenty of technical features that make Java the right choice for many
projects.
FEATURES OF JAVA PROGRAMMING LANGUAGE
Simple, Small and Familiar: like C, C++. No pointers, multiple inheritance
Object-Oriented.
Compiled and Interpreted.
Platform Independent.
Secured: java.Security.package. JAAS(Java Authentication and Authorization Services) for
distributed applications. No pointerss
Robust: Java has strict compile time checking for data type, garbage collected L. exception H
Distributed.
Portable.
Architectural Neutral.
Multithreaded and Interactive.
Dynamic and Extensible
JAVA ENVIRONMENT
1. Java Development Kit (JDK): - Includes a number of development tools
It includes:
Appletviewer (used for viewing the applet)
Javac (It is a Java Compiler)
Java (java interpreter)
Javap (Java diassembler, which convert byte code into program description)
Javah (It is for java C header files).
Javadoc (for creating HTML document)
Jdb (It is Java debugger).
Jar (tool also helps manage JAR files.)
2. Java Standard Library (JSL): - Includes classes and methods.
Also known as the Application Programming Interface (API).
Eg., java.applet, java.Scanner, Java.util etc (packages)
JDK
• JDK=JRE+Development Tools
JAVA VIRTUAL MACHINE
Program whose purpose is to execute other programs.
Programming language compilers convert the source code to machine code.
Java compiler converts the source code into Intermediate code called the byte
code. This machine is called the Java Virtual machine and it exits only inside the
computer memory.
• Functions of JVM:
To allow Java programs to run on any device or operating system (known as the
"Write once, run anywhere" principle)
To manage and optimize program memory.
//Java demo program
public class Test
{
public static void main(String[] args)
{
//code put here
}
}
Pto…
The Virtual machine code is not machine specific. The machine specific code is
generated by Java interpreter by acting as an intermediary between the virtual
machine and real machines as shown below: