Home | Add to Favorites | Ebooks Directory | News  
Java Programming
Home
Java  Article
Java Tutorial 
Java download
Books
JDBC
Java Training
Java Source  Code
Java Applet
Java Questions
Java Tutorial

Java technology is both a programming language and a platform.

The Java is both compiled and interpreted

The Java platform has two components:


 

  • The Java Virtual Machine (Java VM)
  • The Java Application Programming Interface (Java API)

Java is  platform independent language

Java does not support multiple inheritance

Sample Program:

public class Sample{
    public static void main(String[] args) {
                System.out.println("Hello World!");
    }
}



 

The main method controls the flow of the program.It should be declared as public and static so that it can be called direclty without instaniating it.

class Sample2{

}


This program will compile but it  will not run.Since there is no main function defined in this class

comments in Java:

//  single line

/* multiple

Line*/

/** documentation comment*/