Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Collection Frameworks

 
lavanya Ananth
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was reading the book 'Effective Java Programming Language' and There was topic on static factories. I could not understand the disadvantage of using them given below :

It is impossible to subclass any of the convenience implemetaion classes in the Collections Framework.

What are the convenience implementation classes?

Pls explain.

Thanks
Lavanya
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by lavanya Ananth:
... What are the convenience implementation classes? ...

Since the topic was "static factories," I assume this refers to the Collections class. This class "consists exclusively of static methods that operate on or return collections." The Collections class (not to be confused with the Collection interface) cannot be extended (or instantiated) because its constructor is private.
 
lavanya Ananth
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Marc...

I did get confused with Collection interface. Thanks for pointing it out.
Your reply was very helpful now that I can move along reading the book.
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's kind of like the Arrays class. (Note the "s" on the end, as with the Collections class.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic