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 the difference between the methods sleep() and wait()? : Java thread

501


What is implicit object in java?

537


Which collection does not allow duplicates in java?

455


What are predefined functions?

553


What is the difference between synchronized and synchronized block?

494






Can we use catch statement for checked exceptions?

502


What does replaceall do in java?

475


What is oop principle in java?

539


Is the empty set a singleton?

523


Why stringbuffer is faster than string?

526


Can final class have constructor?

487


How many threads does a core java have?

501


What defines function?

529


How do I compare two strings in word in java?

529


How to avoid memory leak in java?

587