Home »
MCQs »
Java MCQs
Can the Java program accept input from the command line?
23. Can the Java program accept input from the command line?
- Yes, using command-line arguments
- Yes, by access command prompt
- No
- None of these
Answer: A) Yes, using command-line arguments
Explanation:
In Java, we can also provide values (arguments) while calling the program through the command line. These arguments are known as Command Line Arguments.