Line 4 declares the method named “main”.
“public” is same as in class declaration and known as “Access Modifier”.
“static” means that the method will execute as a stream, not dynamically.
“void” means that you’ll start and finish complete task inside the method, any you have nothing to hand over data to elsewhere. (You have nothing to return)
“main” is the name of the method, also know as method identifier.
Within the brackets we will add any raw data that will used by the method, know as arguments or paramethers of a method.
All methods starts with a “{“ and ends with “}”.
The ‘main()’ method is a compulsory method in java applications. When the application starts to execute, compiler uses this method to interact with other methods.
No comments:
Post a Comment