static: This method can be run without having to create an instance of the class HelloWorld. void: This method does not return anything. Let's break it down: public: This method is public and therefore available to anyone. It also is defined within curly braces (on line //3 and line //5). Line //3 is the main() method, which is always the entry point into a Java program. Note that the entire class is defined within enclosing curly braces (on line /2 and line //6). All code needs to be in a class in order for the Java runtime engine to run it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |