• CONTEST ALERT - Experience the power of DDR5 memory with Kingston Click for details

Simple programming Error in Java

Not open for further replies.


OSS Enthusiast!
I copied a simple program from a book. Author is E.Balaguruswami
It was just to show basic input using package io and Datainputstream.
After compilation an error was shown--
Note: filename.java uses or overrides a depricated API
Note:Recompile with-Xlint:deprication for detail

Full code is===
import java.io.*;
class sania
public static void main(String args[])
DataInputStream i=new DataInputStream(System.in);
int c=0;
System.out.println("Enter a Number");
catch(Exception e) { }


Cyborg Agent
thats is not an error. Its just a warning meaning that you are using an Outdated API which may not be supported in coming versions. Your compilation was fine. Run the program and it will work.
Not open for further replies.
Top Bottom