English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Give the explain

2006-06-08 17:51:15 · 4 answers · asked by R.Siva 1 in Computers & Internet Programming & Design

4 answers

public static void main()
*main() is the first function which is executed in any java program like main() in c or c++
* public is used because the main function is accesed by the java virtual machine from outside the program. so any code should be able to access it
* static is used when u don call the function thro its object. initially wen u run the prog , u wud not hav created any objects before calling main() . so u cal it static
* void implies tat the function main() does not return any value

2006-06-08 19:18:22 · answer #1 · answered by mickey 2 · 0 0

main() is the first function that is run. It returns nothing (void), it does not manipulate any Object variables (static), and it can of course be accessed from anywhere in the program (public).

2006-06-08 18:38:38 · answer #2 · answered by Ron 6 · 0 0

this just the suntax of java

similar to void main() in c++

2006-06-08 18:08:52 · answer #3 · answered by demaman 3 · 0 0

Any program needs any point to start with.
main() futction is such "entry point".

2006-06-08 17:56:48 · answer #4 · answered by alakit013 5 · 0 0

fedest.com, questions and answers