Question: What is the output if the launch() method is applied to a Properties object loaded from scifi.properties? A. saturn5 null ? B. saturn5 null null

What is the output if the launch() method is applied to a Properties object loaded from scifi.properties? 

scifi.properties rocket-saturn5 moon=landing void launch (Properties props) { var a = props.getProperty

A. saturn5 null ?

B. saturn5 null null

C. null null ?

D. saturn5 ? ?

E. The code does not compile.

F. An exception is thrown at runtime.

scifi.properties rocket-saturn5 moon=landing void launch (Properties props) { var a = props.getProperty ("rocket", "?"); var b = props.get Property ("earth"); var c= props.getProperty("earth", "?"); System.out.print(a + " " + b + " " + c); }

Step by Step Solution

3.53 Rating (160 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To answer this question we need to understand the properties file and the Properties class in Java The Properties class is a subclass of Hashtable and ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Oracle Questions!