Java is an object oriented programming language. It is very similar to C++, Javascript, PHP, and ActionScript.
Java is case sensitive. That means that if the example uses the word "main" it must be typed exactly as shown. "Main", "MAIN" or any other change in the case is an error.
For a more in depth understanding, please read How to think like a computer scientist: Think Java, Chapter 1