and passed as (char *env) it gives the environment details in the program
it'l help when we want to get the environment variables in our program.
shibaji paul
Apr 20th, 2006
I am afraid, nitil goel is also partially correct. The environment parameter is not a character pointer, rather it is a array of character pointers.The actual prototype of the main function wouold be as follows: int main (int argc, char *argv[], char * envp[])argc holds the count of the total numbers of arguments passed to the main function from the command prompt.each elements of the array argv[] holds the base address to each parameter passed from the command prompt.each elements of the array envp[] holds the base address to the environment values passed to the program by the system.Further more , in C and C++ the name of the .exe file with the absolute path is passed as the first parameters, thus the count of parameters that is argc will be one more than the actual parameters passed to the program, which is not the case for JAVA program.
Main(int x).............explaination on arguments passed thr' main