Which collection class allows you to access its elements by associating a key with an element's value, and provides synchronization?
Shamsa hafeez from Lahore, Pakistan is saying java.util.SortedMap is correct answer
akshay kharat from Pune, India is saying java.util.Hashtable is correct answer
Tsega Asresa Mengistu from Dessie, Ethiopia is saying java.util.SortedMap is correct answer
Vaibhav Bisht from Dehradun, India is saying java.util.TreeMap is correct answer
AHMED SOULIMANI from Casablanca, Morocco is saying java.util.Hashtable is correct answer
The expected signature of the main method is public static void main(). What happens if we make a mistake and forget to put the static keyword ?
- [A] The JVM issues an error saying that main method should be declared static
- [B] The compiler issues a warning saying that main method should be declared static and adds it automati
- [C] The JVM successfully invokes the main method
- [D] The JVM fails at runtime with NoSuchMethodError
- [A] package Statement
- [B] import Statement
- [C] Documentation section
- [D] Class declaration section