Lecture-2. Introduction To JAVA Part-1
Lecture-2. Introduction To JAVA Part-1
WHAT IS JAVA ?
WHAT IS PROGRAMMING?
• Instruction to computer/device to perform task.
• Computer understands only 0 and 1. Nothing else.
• So, we need to send the instruction in the form of 0, 1
• Do you write program with just 0 and 1?
CLASSIFICATION/EVOLUTION OF PROGRAMMING
• Gosling’s solution to the problems of C++ was a new language called Oak
after an oak tree.
• In May 1995, Sun Microsystems formally announced Java (Oak was re-
named Java) .
This code can be executed on any system that implements the Java Virtual
Machine
The execution of Bytecode by the JVM is the easiest way to create truly
portable programs.
Java Virtual Machine (JVM)
• A Java virtual machine is a software that is capable of
executing Java byte code.
Java has a large API (application programming interface) covering a wide range of
areas. The following list of Java APIs and applications from Sun show the range of
applications of Java .
For reference http://java.sun.com/products/index.html
Java Foundation Classes (JFC) – GUI
JDBC Database Access
Java Web Server
Embedded Java - Java on embedded devices
Creating, Compiling, Debugging and Execution for these four steps JDK is not user friendly.
IDE is provided for that.
A list of IDEs are:
Eclipse.
Netbeans
IntelliJ IDEA
Using JDK you can compile and run java program from command line.
# c:>java HelloWorld
It runs java byte code on native machine
public class HelloWorldExample
{
public static void main( String args[] )
{
System.out.println("Hello World");
}
}