Tuesday 14 April 2015

A Simple Java Program

A First Simple Program

Let’s start by compiling and running the short sample program shown here:
/*
This is a simple Java program.
Call this file Example.java.
*/

You will follow these three steps:

1.Enter the program.

class Example 
{
// A Java program begins with a call to main().
public static void main(String args[])
{
System.out.println("Simple Java Program.");
}
}

2.Compile the program.

javac Example.java

3.Run the program.


java Example

No comments:

Post a Comment

CakePHP Date Picker

Folder Structure: Controller:   File location - cakephp/src/controller/HomepageController.php namespace App\Controller; use...