• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java 2

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,
I am a novice in Java.I am using the TextPad for java.
When I compile a file, the compiler says that java uses or overrides a deprecated API.Could anyone say why is this so??
 
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What that means is that one of the members you used in your code is 'deprecated'. The JavaDocs for the class will tell you if a member is deprecated (bolded).
Deprecated means that the member in question is no longer to be used. An alternative is usually provided. There are numerous deprecated methods all over the Java packages ... they come up with a better or different way of doing something that requires changes to existing code.
I hope this helps.
Also you can run your java compiler with -deprecation to show the exact name of the deprecated member.
------------------
Chris Stehno (Sun Certified Programmer for the Java 2 Platform)
 
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Deprecated methods still work they are just not the recommended way of doing things. They may not be supported at a later time.
 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Veena,
Java Development Kit (JDK) has evolved over time and each version has it's own version number starting from 1.0 to 1.1 to 1.2 and till the latest 1.3. Java 1.2 onwards is called Java 2. Certain methods in the Java classes may not run in the way they should be or a better implementation of the method may be developed. These new modifications are incorporated in the later versions of JDK. The old methods which still work, but have been deprecated to tell the developer during compilation, that a better method exists for a certain method in the code. The code will still run without any problem. The deprecated error message during compilation, is just a warning for the developer.
------------------
 
veena sriram
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks everyone for the replies.Will talk back at a later time.
 
The only taste of success some people get is to take a bite out of you. Or this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic