Series: Subject: Topic:
Question: 184 of 2110

Print Command Line Arguments

How to print Command Line Arguments without using IO Classes?
Asked by: nv_krishna | Member Since May-2008 | Asked on: May 19th, 2008

View all questions by nv_krishna   View all answers by nv_krishna

Showing Answers 1 - 1 of 1 Answers

you can print command line arguments, by giving what to print while executing java program.the code for this isclass Demo{                 public static void main(String args[])                   {                          for(int i=0;i<args.length;i++)                          {                                  System.out.print("    "  + args[i]);                            }                    }                   }compiling the above program,javac  Demo.javaexecuting the above program,java Demo hello good morningoutput is as followshello good morning

Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions



twitter fb Linkedin GPlus RSS


Interview Question

 Ask Interview Question?


Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.