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
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
Avaya Article: Call Control XML - Powerful, Standards-Based Call Control
Internet.com eBook: The Pros and Cons of Outsourcing
Go Parallel Article: Scalable Parallelism with Intel(R) Threading Building Blocks
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
Go Parallel Article: James Reinders on the Intel Parallel Studio Beta Program
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
Go Parallel Article: Getting Started with TBB on Windows
HP eBook: Storage Networking , Part 1
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Go Parallel Video: Intel(R) Threading Building Blocks: A New Method for Threading in C++
HP Video: Is Your Data Center Ready for a Real World Disaster?
Microsoft Partner Portal Video: Microsoft Gold Certified Partners Build Successful Practices
HP On Demand Webcast: Virtualization in Action
Go Parallel Video: Performance and Threading Tools for Game Developers
Rackspace Hosting Center: Customer Videos
Intel vPro Developer Virtual Bootcamp
HP Disaster-Proof Solutions eSeminar
HP On Demand Webcast: Discover the Benefits of Virtualization
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Microsoft Download: Silverlight 2 Software Development Kit Beta 2
30-Day Trial: SPAMfighter Exchange Module
Red Gate Download: SQL Toolbelt
Iron Speed Designer Application Generator
Microsoft Download: Silverlight 2 Beta 2 Runtime
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
IBM IT Innovation Article: Green Servers Provide a Competitive Advantage
Microsoft Article: Expression Web 2 for PHP Developers--Simplify Your PHP Applications
Featured Algorithm: Intel Threading Building Blocks - parallel_reduce
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES