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??
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)
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. ------------------