---Program Explanation of Java---




class Hello
{
   public static void main(String abc[])
   {
       System.out.println("hello world");

   }

}

//class is the blueprint of the object is used to define the functionality of object using data member and member function.we can define a single object and multiple objects definition using class.

{}   --->  it is called token of class which is used to define block, all block-level statement will be defined by this. for example if-else, switch, loop, function, etc


public:-   it is an access specifier that is used to define the scope of the data member, member function, and class, the public can be accessible outside of the project, package, method, and class.


static:- it is called modifier of java which provides compile-time memory allocation means if we create static variable then it's memory will be fixed but a value can be changed, static variable and method will be called without any object.


void:-  it is a datatype which returns the null value in java.

main():-   it is a predefined entry-point function that will be mandatory for program execution.main() always will be declared static because it will be called without any object.

String args[]:- args is the argument which is used to contain String array type data using the command line, if we want to pass data from command line input then it will work. String parameter type array is mandatory in the main().

System:-  It is the predefined class of java that exists under java.lang package .it is used to handle input /output operation using Java.

out:-   It is the reference of PrintStream class which is used to print statements using print() or println().

print() or println():-  It is used to print output data of java. It is the method of the PrintStream class.


"hello world":-  It is String type literals

;   it means the end of the statement














next :- blogger.com/blog/post/edit/7768209714160124788/9015432222536123854

Post a Comment

If you have any doubt in programming or join online classes then you can contact us by comment .

Previous Post Next Post