avatar
Help: 小程序挑错# Java - 爪哇娇娃
j*1
1
【 以下文字转载自 Complain 讨论区 】
发信人: mitbbs (未名空间), 信区: Complain
标 题: Re: [投诉]TrustinJesus版主Dignity两天之内狂删我19篇主题帖
发信站: BBS 未名空间站 (Tue Jun 28 02:58:38 2011, 美东)
由于版内炸版,会引起误删。版主可恢复其误删的帖子
avatar
a*a
2
不好意思, 又是高中生的题目, 不过我请了两个写程序的高手, 都没找到第二个错!
Here is the code for a simple applet. It doesn't compile, due to two big,
glaring errors in the code. Find the error and explain why it's a mistake.
Then say how you would change the code to fix the error.
import java.applet.Applet;
import java.awt.Graphics;
import java.awt.Color;
import java.awt.Label;
public class ExamApplet1 extends Applet {
Graphics g;
boolean ready=false;
Label questionLabel = new Label("What is this thing?");
questionLabel.setSize(2
avatar
n*r
3
too low-land de le ba
put questionLabel.setSize(25,40);
inside
public void init()
{}

【在 a***a 的大作中提到】
: 不好意思, 又是高中生的题目, 不过我请了两个写程序的高手, 都没找到第二个错!
: Here is the code for a simple applet. It doesn't compile, due to two big,
: glaring errors in the code. Find the error and explain why it's a mistake.
: Then say how you would change the code to fix the error.
: import java.applet.Applet;
: import java.awt.Graphics;
: import java.awt.Color;
: import java.awt.Label;
: public class ExamApplet1 extends Applet {
: Graphics g;

avatar
S*g
4
Exaclty.
My solutions is to put it in
public ExamApplet1()
{
questionLabel.setSize(25,40);
}

【在 n******r 的大作中提到】
: too low-land de le ba
: put questionLabel.setSize(25,40);
: inside
: public void init()
: {}

avatar
a*a
5
谨向NoWonder, SuperString 致敬!

!
big,
mistake.

【在 S*********g 的大作中提到】
: Exaclty.
: My solutions is to put it in
: public ExamApplet1()
: {
: questionLabel.setSize(25,40);
: }

avatar
z*g
6
find in 1 mins.
setBackground(Color.black)
if(ready = true)

【在 a***a 的大作中提到】
: 不好意思, 又是高中生的题目, 不过我请了两个写程序的高手, 都没找到第二个错!
: Here is the code for a simple applet. It doesn't compile, due to two big,
: glaring errors in the code. Find the error and explain why it's a mistake.
: Then say how you would change the code to fix the error.
: import java.applet.Applet;
: import java.awt.Graphics;
: import java.awt.Color;
: import java.awt.Label;
: public class ExamApplet1 extends Applet {
: Graphics g;

avatar
h*e
7
O faint! Tutorial example??

【在 a***a 的大作中提到】
: 不好意思, 又是高中生的题目, 不过我请了两个写程序的高手, 都没找到第二个错!
: Here is the code for a simple applet. It doesn't compile, due to two big,
: glaring errors in the code. Find the error and explain why it's a mistake.
: Then say how you would change the code to fix the error.
: import java.applet.Applet;
: import java.awt.Graphics;
: import java.awt.Color;
: import java.awt.Label;
: public class ExamApplet1 extends Applet {
: Graphics g;

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。