Results 1 to 7 of 7
Thread: the method "main"
- 07-13-2008, 07:45 PM #1
Member
- Join Date
- Jul 2008
- Posts
- 14
- Rep Power
- 0
-
Please see multiple answers to your same question / cross-post in the Sun Java forums.
- 07-14-2008, 06:28 AM #3
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
- 07-14-2008, 07:48 AM #4
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 7
The method "main" belongs to every class which has one. There is nothing special about the main method. The only thing that sets the "main" method apart from any other static method, is that when say
[code]
java MyClass
[/class]
the jvm will attempt to invoke the static method main with a String[] as the argument. So, if that method does not exist, the JVM cannot start your program, but for all of that, it is still just another static method.
- 08-10-2008, 03:03 PM #5
Member
- Join Date
- Jul 2008
- Posts
- 14
- Rep Power
- 0
- 08-10-2008, 03:04 PM #6
Member
- Join Date
- Jul 2008
- Posts
- 14
- Rep Power
- 0
- 08-10-2008, 03:07 PM #7
Member
- Join Date
- Jul 2008
- Posts
- 14
- Rep Power
- 0
Similar Threads
-
[SOLVED] Exception in thread "main" java.util.NoSuchElementException
By thevoice in forum New To JavaReplies: 5Last Post: 05-14-2008, 01:43 PM -
ERROR: Exception in thread "main" java.lang.NoSuchMethodError: main
By barney in forum New To JavaReplies: 1Last Post: 08-07-2007, 07:10 AM -
Exception in thread "main" java.net.ConnectException: Connection timed out
By osval in forum Advanced JavaReplies: 1Last Post: 07-27-2007, 10:59 PM -
Error: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
By romina in forum New To JavaReplies: 1Last Post: 07-25-2007, 10:55 PM -
ArrayList: Exception in thread "main" java.lang.NullPointerException
By susan in forum New To JavaReplies: 1Last Post: 07-16-2007, 06:32 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks