Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ojava uses or overrides a deprecated API

807601Feb 4 2008 — edited Feb 4 2008
can any body help me to uderstatnd why following message comes everytime after compilation with 0 errors if i use DataInputStream or BufferedReader
?

message is as below
Note: StringTest.java uses or overrides a deprecated API.
Note: Recompile with -deprecation for details.

my program is as below
import java.io.*;
class Test
{
public static void main(String[] args)
{
try
{
DataInputStream di=new DataInputStream(System.in);
System.out.println("Enter a string");
String st=di.readLine();
System.out.println(st);



}
catch(Exception e)
{

}

}
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 3 2008
Added on Feb 4 2008
2 comments
1,102 views