What is the output of the following method if props contains {veggies=Bunny, meat=velociraptor
}?
private static void print(Properties props) { System.out.println(props.get("veggies", "none") + " " + props.get("omni", "none")); }
E.
The Properties class defines a get()
method that does not allow for a default value.
It also has a getProperty()
method, which returns the default value if the key is not provided.