Hah! I remember being so, so frustrated in school when my teacher's wouldn't/couldn't explain all the "boilerplate" code they wrapped around the things we actually learned about. I wanted to know the significance of every single character. It took me about a year to memorize "public static void main" because I was bad at memorizing and didn't understand what it actually said.
public: The method is not internal to the class. It must be available for general use.
static: It's a static method on the class that is only loosely associated with the class. Doesn't directly work with the class or an instance except in the way that any other code would interact. A side effect of Java's OMG EVERYTHING MUST BE PART OF A CLASS.
void: No status is returned, unlike in C.
main: Just like in many other languages.
String[]: The arguments that were passed into the program. Unlike C's argv in that its first element isn't the executable name.
3
u/Deepmist Feb 23 '12
Hah! I remember being so, so frustrated in school when my teacher's wouldn't/couldn't explain all the "boilerplate" code they wrapped around the things we actually learned about. I wanted to know the significance of every single character. It took me about a year to memorize "public static void main" because I was bad at memorizing and didn't understand what it actually said.