Which two statements are true about synchronization and locks? (Choose two.)
Given the code fragment:
Map
books.put (1007, “A”);
books.put (1002, “C”);
books.put (1003, “B”);
books.put (1003, “B”);
System.out.println (books);
What is the result?
Given:
interface Rideable {Car getCar (String name); }
class Car {
private String name;
public Car (String name) {
this.name = name;
}
}
Which code fragment creates an instance of Car?
Given:
What is the result?