Uses or overrides a deprecated API. ------- This is the message shown while compiling java program and what should be done to avoid this ???
Deprication details....
Collapse
X
-
Tags: None
-
it means that one of the classes or methods you are useing has been replaced with a another (one hopes better) alternative. The original should still work OK. To get full details compile the program with the -Xlint option which enables warning messages. If you go to the java documentation on the class in question it will tell you what has replaced it.Originally posted by leelaramtennetiUses or overrides a deprecated API. ------- This is the message shown while compiling java program and what should be done to avoid this ??? -
The code will run fine if it has no other errors but it is very bad practice to use deprecated code.Originally posted by leelaramtennetiUses or overrides a deprecated API. ------- This is the message shown while compiling java program and what should be done to avoid this ???Comment
-
readLine() in java.io.DataInp utStream has been depricated. What can be used instead of that to get input from keyboard ???Comment
-
How to avoid deprecation errors ?????
readLine() in java.io.DataInp utStream has been depricated. What can be used instead of that to get input from keyboard ???Comment
-
You should use BufferedReader instead of DataInputStream
Example:
BufferedReader br=new BufferedReader( new InputStreamRead er(System.in));
SiddhantaComment
-
I bet your didn't bother to read the API documentation for the method becauseOriginally posted by leelaramtennetireadLine() in java.io.DataInp utStream has been depricated. What can be used instead of that to get input from keyboard ???
for deprecated items the documentation gives you an alternative way of getting
done what you want to get done. I am not going to repeat the API documentation
for you.
kind regards,
JosComment
-
Jos you just replied to thread which is 1.5 years old ;)Originally posted by JosAHI bet your didn't bother to read the API documentation for the method because
for deprecated items the documentation gives you an alternative way of getting
done what you want to get done. I am not going to repeat the API documentation
for you.
kind regards,
Jos
regards :)Comment
Comment