Search:     Advanced search
Browse by category:
C/C++   |   Java   |   Oracle/Database   |   SAP   |   ASP .NET   |   Mainframe-DB2   |   Freshers

Jack developed a program by using a Map container to hold key/value pairs. He wanted to make a change to the map. He decided to make a clone of the map in order to save the original data on side. What do you think of it? ?

Add comment
Views: 304
Votes: 1
Comments: 0
If Jack made a clone of the map, any changes to the clone or the original map would be seen on both maps, because the clone of Map is a shallow copy. So Jack made a wrong decision.
Others in this Category
document What are the different ways to handle exceptions?
document Is String a primitive data type in Java?
document What is the GregorianCalendar class?
document Are the imports checked for validity at compile time? e.g. will the code containing an import such as java.lang.ABCD compile?
document What is the Collections API?
document When you serialize an object, what happens to the object references included in the object?
document Is it possible to share an HttpSession between a JSP and EJB? What happens when I change a value in the HttpSession from inside an EJB?
document What will be the initial value of an object reference which is defined as an instance variable?
document How can I customize the seralization process? i.e. how can one have a control over the serialization process?
document What's the difference between an interface and an abstract class?
» More articles



RSS