Recently i started to learn java, It is a High level programming language developed by Sun Microsystem

 I am using Netbeans IDE to write Java Code, It is an Object Oriented Language (OOP) here object called as Class, Platform Independent and Case Sensitive .

Hello World Code

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

Here first line is Helloworld class which declared as public , every line of java code run inside in Class, Public Class name and file name should be same, else you will get error while Compiling, here File name is Helloworld.java, For all class names the first letter should be in Upper Case. All method names should start with a Lower Case letter.

public static void main(String[] args) {

And Second line is entry of Java Program, and here

  • "Public" : Any one can access
  • "Static" : can be accessed without requiring an instantiation of the class to which it belongs
  • "Void" : Means it did not return a value
  • "Main" : and it is main method. Java program processing starts from the main() method 
System.out.println("Hello, World!");

Is the line used to print out put

  • "System" : It is the name of standard class that contains objects that encapsulates the standard I/O devices of your system 
  • "Out" : is a reference variable defined in System
  • "println" : Is used to print line 

dot (.) operator in java: In java . (dot operator) is used only to call methods or variables