+ 10
How exactly does the "main" method work?
I understand that in java d main method takes an array of strings as argument but where does this array come from and what does the main method do with it?
3 odpowiedzi
+ 2
all you should know is that the main method runs the program... every method that you create you should added to your main method so you can really see how your program works
+ 11
@Claudio what is d program call and what "exactly" does it pass to d main method
+ 2
public static void main(String[] args)
{ for(int i = 0; i < args.length; i++) { System.out.println(args[i]); } }
args is an array with parameters passed to the function from the program call