Log In Register

Units


Command Line Arguments - Questions and Answers

 

Practice these Command Line Arguments under Java Programming walk-in interview Questions/ examination questions with best tricks and short cuts with solution. Student (candidate) who want to crack the walk in interview, competitive exams and want to find short cuts and tricks to solve questions on Command Line Arguments for following purpose.


– Anyone who is wishing to increase their perfect knowledge of Command Line Arguments of Java Programming.
– Anyone who is preparing for aptitude test and increase his in depth aptitude knowledge Java Programming specifically Command Line Arguments.
– Anyone who is preparing for interviews (competitive examinations, govt examinations and bank examinations, off-campus or on campus interviews, walk-in interview and company interviews) having questions on Command Line Arguments under Java Programming.

– Anyone who is preparing for aptitude test or competitive exam or entrance exam.
– Anyone who is preparing for entrance examinations and other competitive examinations.
– All Experienced, Freshers and Students.

Here is list of Questions and Answers covering all key area of  Command Line Arguments topic of Java Programming:

 

1. Which of these method is given parameter via command line arguments?

Answer: Option A

Explanation:
Only main() method can be given parameters via using command line arguments.

2. How many arguments can be passed to main()?

Answer: Option A

Explanation:

3. Which of these is a correct statement about args in this line of code? public static viod main(String args[])

Answer: Option C

Explanation:
 args in an array of String.

4. Which of these data types is used to store command line arguments?

Answer: Option C

Explanation:

5. Can command line arguments be converted into int automatically if required?

Answer: Option B

Explanation:
All command Line arguments are passed as a string. We must convert numerical value to their internal forms manually.