Forums Register Login

Why the Dictionary class is declared as abstract instead of interface?

+Pie Number of slices to send: Send

The Dictionary class is the abstract class, which doesn't have any concrete methods.

All of it's methods are abstract methods. Why this class declared as abstract?

Why this class is not declared as interface ?
+Pie Number of slices to send: Send
Dictionary is an obsolete relic that was created in Java 1.0. Sun's programmers made quite a lot of programming mistakes back then*, and this is one of those. Ignore the entire class and just use Map.

* How about Stack extending Vector instead of using one internally? Or Observable being an abstract class instead of an interface, with an abstract implementing class AbstractObservable like the current Observable to make it easier for people to implement it? Or Hashtable, Vector and StringBuffer being synchronized even though there isn't any reason for that?
+Pie Number of slices to send: Send
Thanks Rob.
+Pie Number of slices to send: Send
You're welcome.
Today you are you, that is turer than true. There is no one alive who is youer than you! - Seuss. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1426 times.
Similar Threads
Abstarct class & Interfaces
HttpServlet
Thread Doubt
ABSTRACT
Why we can't create object to ABSTRACT & INTERFACE classes?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 08:06:56.