File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Plz help i am a newbie Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Plz help i am a newbie" Watch "Plz help i am a newbie" New topic

Plz help i am a newbie

Tirthankar Mukherjee
Ranch Hand

Joined: Apr 08, 2006
Posts: 51

class CalculateAccnDist
public static void main(String args[])
DataInputStream in = new DataInputStream(;
float a=0.0f;
float u=0.0f;

System.out.println("Enter the initial speed in m/sec :");
System.out.println("Enter the acceleration of the body :");
catch (Exception e) { }
System.out.println(" Time(s) Distance(m)");
for(int t=0;t<=60;t=t+10)
System.out.println(t + ((u*t) + ((a*t*t)/2)));

/* In this above java prog. there is a compiler error,saying :
Note: D:\j2sdk1.4.2_11\bin\ uses or overrides a deprecated API.
Note: Recompile with -deprecation for details.

why ??
plz hwlp mwe I am a newbie
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
That's not an error - it's a warning. The class file should have been created regardless. It tells you that the DataInputStream.readLine method should no longer be used - it is obsolete. The reason, and what to use instead, are outlined in the javadocs for that method.
vignesh hariharan
Ranch Hand

Joined: Jun 23, 2005
Posts: 77
yes.. DataInputStream is an older version of the InputStreams...but still it can be used. but it is better you can replace it with

BufferedReader inp=new BufferedReader(new InputStreamReader(;

now if u use this inp object in your program then the warning messege which u encountered will not be found..

I agree. Here's the link:
subject: Plz help i am a newbie
jQuery in Action, 3rd edition