Topic: 才鸟提问 编译的问题~~ (uses or overrides a deprecated API)

  Print this page

1.才鸟提问 编译的问题~~ (uses or overrides a deprecated API) Copy to clipboard
Posted by: aiff
Posted on: 2004-09-07 13:50

Hi.java代码是
import java.awt.*;
import java.applet.Applet;

public class Hi extends Applet
{
String s;
public void init()
{
String temps;
temps=getParameter("name");
s="everyone";
if (temps!=null)
{
s=temps;
}
}
public void paint(Graphics g)
{
g.drawString("Hi,"+s,size().width/3,size().height/2);
}
}

2.Re:才鸟提问 编译的问题~~ [Re: aiff] Copy to clipboard
Posted by: jerry010
Posted on: 2004-09-07 15:05

什么问题?
继承复写了API并使用了已被取代的Funtion而已

3.Re:才鸟提问 编译的问题~~ (uses or overrides a deprecated API) [Re: aiff] Copy to clipboard
Posted by: why
Posted on: 2004-09-07 19:40

Why don't you try recompiling with
javac -deprecation Hi.java
you'll see which methods are deprecated.

PS. It should be Hi.java, be careful of the case.

PS2. 才鸟?Smile 有才的菜鸟Wink


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923