2018 Lecture 1 - Introduction To Java PDF
2018 Lecture 1 - Introduction To Java PDF
Objectives
• Learn the Java program structure and the essential
methods
• Learn how to compile and run a simple Java program
• Learn the different characteristics of Object-oriented
Java.
Class
Object
Method
Actual Parameter
javac java
Helloworld.java Helloworld.class
JAVA PROGRAM
API
JRE
JVM
package mypackage;
import java.io.*;
public class helloworld{
// class body here ...
}
• The JRE does the following tasks loads the code, verifies the
code and executes the code. It allows Java to be a
programming language that is well suited to designing
software that works in conjunction with the Internet.
• Portable
Java code is compiled into a platform-independent machine code called
bytecode. Java makes use of the JVM – Java Virtual Machine, a special
kind of interpreter.
JAVA bytecode
Sources:
SL-275 Sun Microsystems
Oracle
Wikipedia