Code:public class xxxXXX { public static void main() { } }
- "static" what means ?
- the class xxxXXX how is executed in this java program(file) , I mean the whole java program contained ? A class that has method "main" differs from a normal class ?
Code:public class xxxXXX { public static void main() { } }
- "static" what means ?
- the class xxxXXX how is executed in this java program(file) , I mean the whole java program contained ? A class that has method "main" differs from a normal class ?
'static' means that the method belongs to the class itself, not to the instances of the class (i.e. you doxxxXXX.main(foo)rather than(new xxxXXX()).main(foo)).
You run the application like you would any other:java <classname>. A class with apublic static void main(String[])differs from other classes only in that it can be used as an entry-point into your application.
It's conventional to begin class names with a capital letter.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Bookmarks