GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Tech FAQs  >  Programming  >  Java
Go To First  |  Previous Question  |  Next Question 
 Java  |  Question 556 of 937    Print  
What is the Collection?

  
Total Answers and Comments: 2 Last Update: April 12, 2006     Asked by: suresh 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
March 03, 2006 03:05:06   
mohan        

RE: What is the Collection?

Collection is a framework. Which is added in java2.

It provides some interfaces abstract classes classes and algorithms.

Here algorithms are static methods.

Collection is an interface in Collections framework.

It has some methods like add() addAll() remove() and clear()....

Most of the classess implements the Collection interface


 
Is this answer useful? Yes | No
April 12, 2006 04:23:23   
MP3DJAY Member Since: April 2006   Contribution: 1    

RE: What is the Collection?
Collection InterfacesThere are six collection interfaces. The most basic interface is Collection. Three interfaces extend Collection: Set List and SortedSet. The other two collection interfaces Map and SortedMap do not extend Collection as they represent mappings rather than true collections. However these interfaces contain collection-view operations which allow them to be manipulated as collections.All of the modification methods in the collection interfaces are labeled optional. Some implementations may not perform one or more of these operations throwing a runtime exception (UnsupportedOperationException) if they are attempted. Implementations must specify in their documentation which optional operations they support. Several terms are introduced to aid in this specification: * Collections that do not support any modification operations (such as add remove and clear) are referred to as unmodifiable. Collections that are not unmodifiable are referred to modifiable. * Collections that additionally guarantee that no change in the Collection object will ever be visible are referred to as immutable. Collections that are not immutable are referred to as mutable. * Lists that guarantee that their size remains constant even though the elements may change are referred to as fixed-size. Lists that are not fixed-size are referred to as variable-size. * Lists that support fast (generally constant time) indexed element access are known as random access lists. Lists that do not support fast indexed element access are known as sequential access lists. The RandomAccess marker interface is provided to allow lists to advertise the fact that they support random access. This allows generic algorithms to alter their behavior to provide good performance when applied to either random or sequential access lists.Some implementations may restrict what elements (or in the case of Maps keys and values) may be stored. Possible restrictions include requiring elements to: * Be of a particular type. * Be non-null. * Obey some arbitrary predicate.Attempting to add an element that violates an implementation's restrictions results in a runtime exception typically a ClassCastException an IllegalArgumentException or a NullPointerException. Attempting to remove or test for the presence of an element that violates an implementation's restrictions may result in an exception though some restricted collections may permit this usage.mp3 djay
 
Is this answer useful? Yes | No

 Related Questions

Latest Answer : We need not call the finalize() method directly. The method is called automatically by the garbage collector when it determines no more references to the object exist. But when we need to clean-up non-Java resources ie closing a file, we need ...

Latest Answer : the object that has no reference is assumed to no longer used. so to reclaim its memory garbage collection is used. ...

i don't know 
Latest Answer : where we use iterator than enumeration in collection interface? ...
Read Answers (2) | Asked by : san


A) Daemon thread is a low priority threadB) It runs intermittently in the backgroundC) It does the garbage collection operation for the java runtime system.D) All of the above 
Latest Answer : All of the above(D) is correct answer. ...

When an object is referenced, does this mean that it has been identified by the finalizer method for garbage collection?
A) TrueB) False 

Latest Answer : Collection InterfacesThere are six collection interfaces. The most basic interface is Collection. Three interfaces extend Collection: Set, List, and SortedSet. The other two collection interfaces, Map and SortedMap, do not extend Collection, as they represent ...
Read Answers (2) | Asked by : suresh

Latest Answer : Reclaming the unused memoryuse System.gc(); method. ...
Read Answers (7) | Asked by : suresh

Latest Answer : U can do this by using the following method available in Collectionstatic Collection unmodifiableCollection(Collection c)it will return u an immutable collection. ...
Read Answers (1) | Asked by : ganeswar barik



 Sponsored Links

 
Related Articles

Service Oriented Java Business Integration Review

Service Oriented Java Business Integration Review Introduction If you ve read through the texts which give you an introduction to SOA or Web Services you will often find them to be quite frustrating and the reason for this is because they spend too much time referencing business processes which are
 

Concepts of Object-Oriented Programming

Object Oriented JavaScript In this chapter you ll learn about OOP Object Oriented Programming and how it relates to JavaScript As an ASP NET developer you probably have some experience working with objects and you may even be familiar with concepts such as inheritance However unless you re already a
 

Java and Client Server Models

Java and Client Server Models The Role of Client Servers on the Web Client server models provide the essential mechanisms for working with the Internet In fact most of the World Wide Web is built according to this paradigm In client server models the web browsers run by millions of users are the cli
 

What is Data Collection

A database can be vast shared collection composed of data which are logically related to each other. Businesses rely heavily on data as they are Databases are used for managing the business day to day tasks so Data Collection happens every single day. Collection of data may seem a simple and trivial
 

What is Data Collection Time

Modern Relational Database Management Systems can be configured to collect data at certain events.  In a business, some of the events are sale, order, deposit, pay, request and many more. Events are really business activities in a company.  Big companies, in order to gain competiti
 

What is Data Collection Frequency

Data Collection Frequency, just as the name suggests refers to the time frequency at which data is collected at regular intervals. This often refers to whatever time of the day or the year in any given length of period. In a data warehouse, the relational database management systems continually ga
 

SQL Programming

SQL Programming Overview Anybody who has done something for a long time has probably wanted to change how things work at some point or another. A worker at a mill might have found a more efficient way of cutting logs, or a mathematics teacher might have had a hand in changing a school’s al
 

WinRunner Programming Concepts

If you want to create WinRunner scripts that are highly efficient, there are important programming concepts that you will want to become familiar with. Understanding these concepts will provide you with a large number of key benefits. In addition to understanding these concepts, you must also learn
 

Programming Languages Certification

IT Certification programs have several options that will offer you the best knowledge.  By learning everything that you need to know about information technology you will be able to open new doors to your career and personal business desires.  IT Certification offers several vari
 

Using UML with Java

Using UML with Java While Java is not a new language its application for the development of embedded systems is quite new Developers are beginning to take a second look at modeling languages such as UML and many feel it can be a powerful tool in their development arsenal mosgoogle center Introductio
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2010 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape