About HPC Systems Software User Guides Education Partners

  / gears / hpc / education / tutorials / java


Introduction

Definition

Examples

Installation

Applets

Example 01

Example 02

Example 03

Example 04

Example 05

Example 06

Object Oriented Programming

Java Security

References

Application


A stand-alone java program that does not need any browser to run it. However, a Java interpereter is needed to run a Java application.

UNIX:

java application1

DOS shell(Windows 95/NT):

java application1

MacOS:

Just Drag the application1 file icon onto the Java Interpreter icon.

The following code shows the listing of a stand-alone Java application.

class application1{
public static void main(String[] args){
System.out.println("Abdul H. Aziz");
}
}


Observations

  1. The entry point of every a JAVA application is the main method.
    The declaration of the main method has three modifiers:
    • public
    • static
    • void
    Argument to the main method is an array of elements of type String
  2. The skeleton of any Java program is a class definition.
  3. Methods exists within class or an object. In Java a class definition is achieved via:

class name {
... put vairables and methods here ...
}



Please send questions or suggestions about this web page to beatnic@aset.psu.edu

ASET | ITS | Penn State