Basic Syntax of Java

  1. public class Hp
  2. {
  3. public static void main (String args[])
  4. {
  5. System.out.println("Hp = Hello Programmer");
  6. }
  7. }

PROGRAM DESCRIPTION

public Access Modifier Keyword to specify how external access to this class is managed.
class Class Keyword Class is a blueprint or a template for creating different objects which defines its properties and behaviors.
Hp Program Name Class declaration ( ClassName )
{ } Curly braces Curly Braces are used to control the flow of blocks
public Modifier It is a access specifier that means it will be accessed by publically.
static Keyword It tells about the scope of variables and functions of the class.
void Return type It does not return any value.
main Function It is a method or a function name. (Program Execution Started from main)
( ) Brackets
String String is a real class in Java.
args
[ ] Square Brackets
System class System is a class in the java.lang package.
. Association Operator It establish relationship between classes through their objects and classes.
out out is a static member of the System class and is an instance of java.io.PrintStream.
println Function println is a method of java.io.PrintStream. ( \n in C Language )
; Semicolon Statements are terminated with semicolon
DIAGRAMMATIC REPRESENTATION
    STRUCTURE OF A JAVA PROGRAM

| Copyright ©2016 | All Rights Reserved |
| Design by Uves Khan |

Free Web Hosting