Public Static void main | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Public Static void main

can anyone give me a simpler explanation for these words...

2nd Jul 2016, 4:12 PM
Srivatsa Balaji
Srivatsa Balaji - avatar
2 Answers
+ 1
Public: is the visibility. This can be public, private, protected or (if you omit a value) default. Static: is a special [optional] keyword that indicates that this method can be called without creating an instance of this class. Without it, you have to instantiate this class and call this method from the resulting object. Void: is the return type of this method, indicating that this method doesn't return anything. Methods must have a return type. Main:( ... ) is the name of this method. Methods have to be named. The parentheses indicate that this is a method.
2nd Jul 2016, 4:32 PM
Abdelrhman Sami
Abdelrhman Sami - avatar
0
Yaaa thts absolutely right
3rd Jul 2016, 8:45 AM
shubhu