FRESHERSHOME![]() |
This is a discussion on java main() problem? within the JAVA forums, part of the Languages category; class myclass { public static void main(String arg[]) { } } when i execute program javac myclass.java then run program ...
| |||||||
| Notices |
| JAVA JAVA Discussion Forum, Jave Related help |
![]() |
| | Thread Tools | Display Modes |
|
#1
| |||
| |||
| class myclass { public static void main(String arg[]) { } } when i execute program javac myclass.java then run program java myclass everything is ok here.But my confusion is that when we define main () method,we write it with parameterized method (String ar[]) and at the run time we are not giving any parameter. or value.then how it is work actually. even there is not function overloading.
__________________ Powered by Yahoo! |
|
#2
| |||
| |||
| Good question, I cant even find the api that describes main. Im guessing your either the argument is given null values internally, or main's function signature implements varargs, but since varargs are new to Java, I think the latter is more probable.
__________________ Powered by Yahoo! |
|
#3
| |||
| |||
| the main method is a special method, if u will like the .equals() method (not one to be over written but u understand) the array of string arguments that it takes as parameters is actually the lines that u write in the actual program. so the lines of code u write in ur programs is the parameters passed through the main method.
__________________ Powered by Yahoo! |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Sitemap
Jobs by Location: Advertising and Marketing Jobs - IT Software Jobs - Walk-in Jobs - BPO Jobs - Government Jobs - Sales / BD Jobs - Tele Communication Jobs App Programming - Network Admin
Jobs By Location: Jobs in Bangalore - Jobs In India - Jobs in Delhi - Jobs in Hyderabad - Jobs in Kochi - Jobs in Mumbai - Jobs in Trivandrum - Jobs in pune - Jobs in Jonida - Jobs in Chennai - Jobs in Coimbator
Jobs Type: Full Time Jobs - Part Time Jobs
Latest Jobs - Accounting Jobs - Engineering Jobs - IT Jobs - Walkins - How to Face Interview - HR Round Tips - Career Info - Guide For Freshers - Apply for Jobs - Future Studies - Jobs Forums - Freshers IT Software Salary Details