Computer Science, asked by Bhaavinjain, 1 year ago

meaning of public static void main string args in java

Answers

Answered by devilamaya1
4

Answer:

public is used to show that it is note protected it is meant for public

static means it is stable

voidnto initialize object

main to start the program

string args meand a object you can also write string hattI

please mark as brainliest

Answered by Anshu33845
3

Answer:

public is the access modifier of the main method that means our main is accessible for anywhere.

static is a keyboard which identifies the class related things in that mean it tells that our main method belongs to our class.

void is used to define the return type of the method and it tells that it does not get any returns.

main is the name of the method that is caused by Java Virtual Machine as a starting point for an application with a particular sign only that it is searched by Java Virtual Machine during code execution time and we put our input in our main method as an array of strings and it also known as command line arguments. In Java is the most important method as it is the entry point of any Java program.

String args [ ] is the parameter to the main method where the argument name could be anything whatever you want.

Program

public class FirstProgram

{

public static void main (String [ ] args)

{

System.out.println("Hi");

}

}

Similar questions