why java designers at SUN decided that 'static' should be there with 'public static void main( String args)?Why not without static
posted 13 years ago
main()is a special method - it's an "entry point." That's what the JVM calls to start your program. It's a simple, well defined execution start point. If you didn't make it static, that would mean the JVM would have to create an instance of your main-class before it could call the main() method, and this is not only more work, but less flexible because it has to make a lot of assumptions about your initial program state. It's much simpler to have a well-defined static method that can be called without any class instances, and let the implementor of main() (the programmer) fill in all the little details about what to do one the user thread is executing .