Hour 16

   

1:

Why would you want to choose an Array object over an ArrayList object? Why would you choose an ArrayList object over an Array object?

A1:

An Array object has a set size, whereas an ArrayList object can grow as items are added to it.

2:

The Array class internally allocates contiguous blocks of memory. Does the stack and queue do the same? Why or why not?

A2:

No, they don't. Stacks and queues are implemented more like linked lists than arrays. You cannot index a Stack or Queue object in the same way you can index an Array object.

3:

What happens when you add a hash table element that has the same key to an element already in the hash table?

A3:

You will receive an ArgumentException.


   
Top


Sams Teach Yourself Visual C++. NET in 24 Hours
Sams Teach Yourself Visual C++.NET in 24 Hours
ISBN: 0672323230
EAN: 2147483647
Year: 2002
Pages: 237

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net