IndiaBIX.com
Arithmetic Aptitude Data Interpretation
Logical Reasoning Verbal Reasoning Non Verbal Reasoning
General Knowledge
Sudoku Number puzzles Missing letters puzzles Logical puzzles Playing cards puzzles Clock puzzles
C Programming C++ Programming C# Programming Java Programming
Microbiology Biochemistry Biotechnology Biochemical Engineering
Civil Engineering Mechanical Engineering Chemical Engineering Networking Database Questions Computer Science Basic Electronics Digital Electronics Electronic Devices Circuit Simulation Electrical Enigneering Engineering Mechanics Technical Drawing
Placement Papers Group Disucssion HR Interview Technical Interview Body Language
Aptitude Test Verbal Ability Test Verbal Reasoning Test Logical Reasoning Test C Programming Test Java Programming Test Data Interpretation Test General Knowledge Test
Data Structures Operating Systems Networking DATABASE Database Basics SQL Server Basics SQL Server Advanced SQL Server 2008 JAVA Core Java Java Basics Advanced Java UNIX Unix File Management Unix Memory Management Unix Process Managemnt C Interview Questions The C Language Basics .NET Interview Questions .NET Framework ADO.NET ASP.NET Software Testing

Java Programming - Objects and Collections

@ : Home > Java Programming > Objects and Collections > General Questions

Exercise

"Success has many fathers, while failure is an orphan."
- (Proverb)
1. 

Suppose that you would like to create an instance of a new Map that has an iteration order that is the same as the iteration order of an existing instance of a Map. Which concrete implementation of the Map interface should be used for the new instance?

A. TreeMap
B. HashMap
C. LinkedHashMap
D. The answer depends on the implementation of the existing instance.

2. 

Which class does not override the equals() and hashCode() methods, inheriting them directly from class Object?

A. java.lang.StringB. java.lang.Double
C. java.lang.StringBufferD. java.lang.Character

3. 

Which collection class allows you to grow or shrink its size and provides indexed access to its elements, but whose methods are not synchronized?

A. java.util.HashSetB. java.util.LinkedHashSet
C. java.util.ListD. java.util.ArrayList

4. 

You need to store elements in a collection that guarantees that no duplicates are stored and all elements can be accessed in natural order. Which interface provides that capability?

A. java.util.MapB. java.util.Set
C. java.util.ListD. java.util.Collection

5. 

Which interface does java.util.Hashtable implement?

A. Java.util.MapB. Java.util.List
C. Java.util.HashTableD. Java.util.Collection




© 2008-2013 by IndiaBIX™ Technologies. All Rights Reserved | Copyright | Terms of Use & Privacy Policy

Contact us: info@indiabix.com     Follow us on twitter!