JAVA Programming :: Packages - Discussion

Home > JAVA Programming > Packages > MCQs Questions Discussion

3 / 6

Choose the correct option.

You have a class file name Test.class inside javaproject directory.

Test.java source code is :
import javutil.Properties;
class Test {
public static void main (String[] args){
Properties p = System.getProperties();
System.out.println(p.getProperty("key1"));
}
}
you have issued below commands from command prompt.
cd javaproject
java -D key1=value1 Test
What is the output ?

Avalue1

Bnull

CRun successfully but no output

DRun fails - javlang.NoClassDefFoundError: key1=value1

Answer: Option (Login/Signup)

Show Explanation

Asked In ::

Post Your Answer Here:     

No Discussion on this question yet!