Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

about Collection

 
zhang ying
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
l have tow questions(follow):
1> which Collection Type has its function that is Defines base methods for an ordered set?
A)java.util.SortedSet;
B)java util.Arrays;
C)java.util.Iterator;
D)java.util.TreeSet;
E)java.util.Collection.
2>which Collection Type has its function that is defines methods for
random access to a collection?

A)java util SortedSet;
B)java util.Arrays;
C)java.util.Iterator;
D)java.util.TreeSet;
E)java.util.Collection.
so please give me answers and tell me why?
 
Ankit Garg
Sheriff
Posts: 9521
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to Javaranch Zhang...

Well the first one is A)SortedSet as it defines methods which are overriden by TreeSet which is a Sorted Set...

The second one is I think is Collection. Because rest of the options are ordered according to me....

Also whenever you post a question, you must tell from where the question is coming. This means that you must tell the name of the site or book from which this question is....
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15367
40
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch, zhang ying.

One of the rules that we have on JavaRanch is that when you copy a question from a book or mock exam, we require that you quote your sources. So, please tell us where you copied it from.
 
zhang ying
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
l am so sorry.
But thanks for your notice.You kown: l come here frist and the rules of here l get less clearly.
The tow questions come from a book which named is<<Sun Certified Programmer for Java5>>
 
Ankit Garg
Sheriff
Posts: 9521
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what about the correct answers...aren't they given in the book???
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic