这是什么原因呀import java.awt.*; import java.applet.*; public class CE extends Applet{ public void
importjava.awt.*;importjava.applet.*;publicclassCEextendsApplet{publicvoidprint(Graph...
import java.awt.*;
import java.applet.*;
public class CE extends Applet{
public void print(Graphics g){
g.drawString("This is default Color!",20,20);
Color(0.6f,0.4f,0.2f);
g.setColor(c);
g.drawString("This is new Color!",20,60);
}
public static void main(String[] args){
}
}
//import java.applet.Applet;
public class JA extends Applet{ //interface expected{
String print-text;
public void init(){
print-text="JA";
}
public void print(Graphics g){
g.drawString(Print-text,20,20);
}
}
E:\新建文件夹 (3)>javac ce.java
ce.java:15: 需要 ';'
String print-text;
^
ce.java:15: 需要 <标识符>
String print-text;
^
2 错误
JDK1.7.0与1.4.0有什么区别呀,请给我把上面的改好一整篇代码吧 展开
import java.applet.*;
public class CE extends Applet{
public void print(Graphics g){
g.drawString("This is default Color!",20,20);
Color(0.6f,0.4f,0.2f);
g.setColor(c);
g.drawString("This is new Color!",20,60);
}
public static void main(String[] args){
}
}
//import java.applet.Applet;
public class JA extends Applet{ //interface expected{
String print-text;
public void init(){
print-text="JA";
}
public void print(Graphics g){
g.drawString(Print-text,20,20);
}
}
E:\新建文件夹 (3)>javac ce.java
ce.java:15: 需要 ';'
String print-text;
^
ce.java:15: 需要 <标识符>
String print-text;
^
2 错误
JDK1.7.0与1.4.0有什么区别呀,请给我把上面的改好一整篇代码吧 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询