• Post Reply Bookmark Topic Watch Topic
  • New Topic

Why is Java IO Abstract Class Based while Collections are Interface based

 
aadhar sharma
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why is Java IO Abstract Class Based while Collections Interface based
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The library authors got smarter over time?
 
aadhar sharma
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Didnt really get what you meant

Thanks and Regards

Aadhar Sharma
 
bart zagers
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The IO api is older than the collections api (which was added in java 1.2, that's why we have Vector and HashTable, they are older too).
Stan meant that the developers by then had learned that interfaces were better for this than the abstract classes.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remember the first release of the library was written by Java newbies. They may have been giants of computer science or recent college grads or both but none of them had years of experience in Java. All in all they did a pretty darned good job, but there are some classes in there that nobody loves and it's nearly impossible to change APIs that thousands of us use every day. So you'll ask yourself "Why did they do that?" every now and then.
 
aadhar sharma
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Guys Help Appreciated

Thanks and Regards

Aadhar Sharma

"Some times winning is everything"
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!