What are command line arguments?

Answer Posted / ami singh

ya all people all right
class Amit
{
public static void main(String [] args)
{
for(int i =0;i<args.length;i++)
{
System.ou.println("value" + args[i]);
}
}
javac Amit.java
java Amit asad fgh jkl // value pass through command
value :asad fgh jkl
ami singh amitsing2008@gmail.com

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is string pool?

629


Explain jdk, jre and jvm?

567


What best practices should you follow while writing multithreaded code in java?

545


What is == in java?

568


What is a conditional equation?

562






Is space a character in java?

516


Why is singleton class used?

527


What is main string [] args?

522


Can singleton class be serialized?

516


how to deploy apache tomcat server to weblogic server in java

1599


What is parameter example?

546


What is the latest version of java?

587


Does every java program need a main?

538


What's the purpose of using break in each case of switch statement?

514


What exceptions occur during serialization?

612