问答题
import java.awt.*;
import java.Applet;
/*
<applet Code="ex34_3.class" width=800 height=400 >
</applet>
*/
public class ex34_3 implements Applet
{
int x=10;
char chr=’R’;
Label output1;
Label output2;
private void init()
{
output1=new Label ( "定义int类型变量"+ "x,的初值为"+x);
output2 =new Label ( "定义char类型变量" +" chr, 的初值为"+chr);
add(output1);
add(output2);
}
}
ex34_3.html
<HTML>
<HEAD>
<TITLE>ex34_3</TITLE>
</HEAD>
<BODY>
<applet code="ex34_3.class" width=400 height=400 >
</applet>
</BODY>
</HTML>