How to Use Command-Line Arguments in Java - Quiz

Total: 3 questions

1. 

Which option should be used with the java command to set a system property?

-D option

2. 

Launch the class named MyNewClass.class with two String arguments with values ex and 5. And create a system property called myNewProp with value myNewValue.

java -DmyNewProp=myNewValue MyNewClass ex 5

3. 

How to get Properties object?

Properties p = System.getProperties();

Page 1 of 1