jGuru
Register Email     Password Forgot your
password?
HOME FAQS FORUMS DOWNLOADS ARTICLES PEERSCOPE LEARN

  Search   jGuru Search Help

View:
Collections FAQ Home Page

FAQ Manager is guru Brandon Rohlfs.

The Collections Framework offers support for Abstract Data Types (ADTs) beyond Vector and Hashtable starting with the Java 2 platform, version 1.2.

What's New

Why should all Comparators be Serializable?
Java:API:Collections
John Zukowski PREMIUM, Sep 28, 2007
If you pass a Comparator that doesn't implement Serializable into a collection like a TreeMap, that collection will automatically be non-serializable....
What purpose does the newSetFromMap() method offer if I can just create something like a HashSet instead of a HashMap?
Java:API:Collections
John Zukowski PREMIUM, Sep 28, 2007
The Set returned by newSetFromMap() functions with the same ordering and concurrency characteristics of the map it is based off of. Some Map implementations...
What is a Deque?
Java:API:Collections
John Zukowski PREMIUM, Sep 28, 2007
A Deque is a double ended queue, allowing inserting and removing from both ends.

What does Class<String> mean?
Java:API:Collections, Java:Language:Declarations
John Zukowski PREMIUM, Oct 31, 2006
Class<String> is the generics way of writing String.class. It allows you to improve type safety.
What does Class<String> mean?
Java:API:Collections, Java:Language:Declarations
John Zukowski PREMIUM, Oct 31, 2006
Class<String> is the generics way of writing String.class. It allows you to improve type safety.
What is the natural ordering of a Boolean? Does FALSE come first or second?
Java:API:Collections, Java:Language:Classes
John Zukowski PREMIUM, Oct 31, 2006
Boolean.FALSE < Boolean.TRUE
How do I create a multimap in Java?
Java:API:Collections
John Zukowski PREMIUM, Oct 31, 2006
Typically a Map maps a key to a single value. To have a multimap, the values of a Map should be a List instead. Thus there can be multiple values in the...
What is a multimap?
Java:API:Collections
John Zukowski PREMIUM, Oct 31, 2006
A multimap is a map where a single key can map to multiple values. (And a value can be associated with multiple keys.)
What is a multimap?
Java:API:Collections
John Zukowski PREMIUM, Oct 31, 2006
A multimap is a map where a single key can map to multiple values.
How can I detect if a duplicate is added to a Set?
Java:API:Collections
John Zukowski PREMIUM, Oct 31, 2006
The add() method returns a boolean. If the set did not previously contain the element, true is returned. If the set previoulsy did contain the element,...
Is it better to use a for-each loop or an Iterator with a collection?
Java:API:Collections
John Zukowski PREMIUM, Oct 31, 2006
It depends on what you need to do. The remove() method of an Iterator is the safe way to remove elements from an underlying collection. You can't safely...
Why do I keep getting an UnsupportedOperationException thrown when I try some collection operations?
Java:API:Collections
John Zukowski PREMIUM, Oct 31, 2006
Several methods of the collection interfaces are considered optional. If an unsupported operation is called, that is when you'll see the UnsupportedOp...
What implementations of the Deque interface does Java offer?
Java:API:Collections
John Zukowski PREMIUM, Sep 30, 2006
ArrayDeque offers an array backed deque. LinkedList offers a linked list version. LinkedBlockingDeque offers an optionally bounded blocking version.
How do you pronounce Deque?
Java:API:Collections
John Zukowski PREMIUM, Sep 30, 2006
Deque is pronounced like deck, not de-queue.
What is the purpose of the CopyOnWriteArrayList and CopyOnWriteArraySet collections?
Java:API:Collections, Programming:Concepts:Threads
John Zukowski PREMIUM, Jun 30, 2006
Synchronized operations are costly and if you aren't modifying a collection much, it is best not to synchronize all collection accesses. The CopyOnWriteXXX...
How do I make a copy of an array?
Java:API:Collections
John Zukowski PREMIUM, Jan 22, 2006
The arraycopy method of System allows you to do this but... starting in Java 6, there is a new copyOf() method added to the Arrays class that is slightly...
How can I insert an element into a List?
Java:API:Collections
Brandon Rohlfs, Sep 23, 2005
In order to insert an element into a List add(int index, E element) must be used since the List interface does not provide an insert method. If the index...
What is the difference between a Stack and a Queue?
Java:API:Collections
Brandon Rohlfs, Sep 20, 2005
First things first. Where can Stacks and Queue's be found? Java provides a Stack class, which can be found within the java.util namespace. Within...
How can I create an immutable List consisting of n Copies of an Object?
Java:API:Collections
Brandon Rohlfs, Sep 14, 2005
nCopies(int n, T o) can be used to create an immutable List which contains a specific number of copies of an Object. Care must be taken when trying to...
How can I find the maximum element contained within a Collection?
Java:API:Collections
Brandon Rohlfs, Sep 8, 2005
Finding the maximum element within a Collection is easy. The following method can be used which can be found within the Collections class. public...
« previous beginning next »


Ask A Question



Related Links

Collections Forum

JGL vs. Collections Framework

Java Collections Short Course

Java Collections Tutorial

Java Collections Chapter

Collections for JDK 1.1

The Colt Distribution

Historical collection classes--Arrays

Wish List
Features
About jGuru
Contact Us

 




JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
ServerWatch.com Article: Virtualization Enters the SMB World
ITChannelPlanet.com Article: Emerging E-Discovery Market Grows More Vital for VARs
StoreVault Whitepaper: Introduction to Networked Storage
Oracle eBook: Implementing Business Intelligence in Your Organization
Hoovers Sales Tip: Building Credibility with New Clients
SAP Whitepaper: A Corporate Guide to Better Decisions Through IT
Microsoft Article: Flexibility, Agility the Keys to Dynamic IT
Microsoft Article: Improving Infrastructure Management for Mid-Size Companies
IBM Whitepaper: CIO Insights--Ignite Innovation by Fusing Business and IT
IBM Whitepaper: Transforming Legacy Apps into SOA
Internet.com eBook: All About Botnets
Intel Article: 8 Simple Rules for Designing Threaded Applications
Symantec Whitepaper: E-Mail Discovery--Worst-Case Scenarios Versus Best Practices
Ipswitch Whitepaper: Secure File Transfer In the Era of Regulatory Compliance
Symantec Whitepaper: A Unified, Proactive Approach to Endpoint Security
APC eBook: Putting the Green in IT
Intel Whitepaper: Best Practices for Developing and Optimizing Threaded Applications
Symantec Whitepaper: Emerging Trends in Fighting Spam
Oracle eBook: Guide to Oracle 11g and Database Migration
Symantec Whitepaper: Best Practices for IM Archiving & Compliance
Intel Article: The Challenges of Developing Multithreaded Processing Pipelines
Avaya Whitepaper: SIP--Creating Next-Generation Telecom Applications
Avaya Article: Event Processing Demands Real-Time Response for Communications-Enabled Business Apps
MessageLabs Whitepaper: Spam Spikes--A Real Risk to Your Business
Symantec Article: Guarding the Corporate Gateway
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Epicor Webcast: Requirements to Consider When Looking at ITSM Tools
Intel Video: Three Must-Knows for Parallelism
Microsoft: NXT Web Seminar Series
Microsoft Partner Program Video: The Secrets to Partner Success
Rational Asset Manager: Succeed with Asset-based Development
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
NXPowerLite: Desktop Edition Software Trial
IBM Rational Systems Development Solution e-Kit
IBM SOA Development Survival Guide eKit
Evaluate IBM Rational Build Forge Online
IBM Enterprise Architect eKit for SOA
Evaluate Rational Application Developer Online
Iron Speed Designer Application Generator
Symantec IM Detection Utility
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
IBM Overview Video: Next Generation Data Warehousing
IBM Tutorial: Intro to XML User Interface Language (XUL) Development
Microsoft How-to Article: Get Going with Silverlight and Windows Live
IBM Tutorial: The Ajax Transport Method
IBM Tutorial: Learning PHP
IBM Tutorial: Validating XML
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES