"fiziwig" <fiziwig@yahoo.com> wrote in message
news:1154110981.948447.308110@s13g2000cwa.googlegroups.com...
Knute Johnson wrote:
My best suggestion is to use the modern classes and methods.
Thanks. I'm sure that's good advice. As a newbie to Java, is there
anything in the Java docs that tells me which are the modern classes
and methods? I just built my very first ap on snipets of code borrowed
from the Java tutorial on the sun site. I don't recall any mention of
"modern" vs "ancient" classes.
Not really, AFAIK. Some classes have a "since" tag, which tell you when
they were introduced. If they were introduced since 1.5, for example,
they're probably not ancient (seeing as how 1.5 is the current version at
the time of writing this post). However, even if you see something like
"since 1.1", while that's an indication that the class is old, that doesn't
nescessarily mean there exist anything newer to replace it. Maybe that old
class is doing its job well, and Sun is following a "If it ain't broke,
don't fix it" philosophy.
On the other than, there's also a "deprecated" tag. This is supposed to
clearly indicate that you should avoid the class whenever possible, because
something newer HAS replaced it. Ideally, near the "deprecated" tag will be
an explanation of what to use instead of this class, but sometimes the
documentation authors forget to write that stuff.
@since attributes.