This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Hello Friends, I can't understand the philosphy of Marcus(Infact JVM) for the following question.
Ans: Compile time error Explanation: You will get an error saying something like "Cant make a static reference to a non static variable". Note that the main method is static. Even if main was not static the array argv is local to the main method and would thus not be visible within amethod. Regards, Hassan.
Always Belive On Logic!!
Rashmi Hosalli
Ranch Hand
Joined: Jun 25, 2001
Posts: 50
posted
0
Hassan, What is that you did not understand here?As the explaination goes,argv[] is of course local to the main method and amethod can access MyArg but not argv[].Also since MyArg[] is non static,you cannot access it directly without creating an instance of the class Arg. Rashmi