Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 14-10-2005, 02:14 PM   #1 (permalink)
OSS Enthusiast!
 
nitish_mythology's Avatar
 
Join Date: Sep 2005
Location: Hills of Kumaoun
Posts: 664
Default Simple programming Error in Java


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;
try
{
System.out.println("Enter a Number");
c=Integer.parseInt(i.readLine());
}
catch(Exception e) { }
System.out.print(+c);
}
}
nitish_mythology is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 14-10-2005, 06:30 PM   #2 (permalink)
Wise Old Owl
 
Join Date: Jul 2004
Location: Bangalore
Posts: 1,208
Default

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.
__________________
AMD 64 3500+ Venice
DFI Lan Party Ultra-D
2* 512 MB PdP Memory with 2-2-5L timings
XFX 7900GT 256 MB Card
icecoolz is offline  
Old 15-10-2005, 12:01 AM   #3 (permalink)
Wise Old Owl
 
aadipa's Avatar
 
Join Date: Feb 2004
Location: Palghar, Mumbai
Posts: 1,000
Default

It is just warnning. Which version of Java SDK are you using?
__________________
i generally prefer quality over quantity
1 aadi + 1 aadi = 1 full ;)
aadipa is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Charan
- by Sarath
- by clmlbx

Advertisement




All times are GMT +5.5. The time now is 12:39 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2