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 - Discussion

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

Read more:

"Example is better than precept."
- (Proverb)
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.HashSet[B]. java.util.LinkedHashSet
[C]. java.util.List[D]. java.util.ArrayList

Answer: Option C

Explanation:

All of the collection classes allow you to grow or shrink the size of your collection. ArrayList provides an index to its elements. The newer collection classes tend not to have synchronized methods. Vector is an older implementation of ArrayList functionality and has synchronized methods; it is slower than ArrayList.


Jagan M Reddy said: (Mon, Aug 29, 2011 12:16:36 PM)    
 
What about java.util.list, I think its correct but I think its interface. I have doubt over here please can u solve it for me ?

Omprakash said: (Fri, Jan 25, 2013 02:22:52 PM)    
 
The current code will not compile due to the error introduced due to incorrect paranthesis.

The correct code would be,
java.io.PrintWriter out = new java.io.PrintWriter(new java.io.OutputStreamWriter(System.out), true);

PrintWriter accepts OutputStream and boolean as its arguments in one its constructor. The above code will ensure that the PrintWriter obj acts as System.out

Write your comments here:
Name *:     Email:


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

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