public class ShowWeight extends javax.swing.JApplet{
float lbs = (float)0;
float ozs;
float kgs;
String name = "alex";
public void init(){
String lbsValue = getParameter("weight");
if(lbsValue != null)
Float lbsTemp = Float.valueOf(lbsValue); //需要;并且不是语句
lbs = lbsTemp.floatValue();
}
String personValue = getParameter("person");
if (personValue != null) //非法的类型开始
name = personValue; //需要标识符
float ozs = (float)(lbs*16);
float kgs = (float)(lbs/2.204623);
public void paint(Graphics g){
Graphics2D g2D = (Graphics2D)g;
g2D.drawString("Studying the weight of" + name,5,30);
g2D.drawString("in pounds" + lbs,55,50);
}
}
以上三个问题怎么解决呢?谢谢