免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3041 | 回复: 1
打印 上一主题 下一主题

一个scjp问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2002-07-05 16:48 |只看该作者 |倒序浏览
请教高手:\r\n       为什么是B?\r\n\r\n\r\nimport java.applet.Applet;\r\n\r\nimport java.awt.*;\r\n\r\n \r\n\r\npublic class Sample extends Applet {\r\n\r\nprivate String text = \"Hello World\";\r\n\r\npublic void init() {\r\n\r\nadd(new Label(text));\r\n\r\n}\r\n\r\npublic Sample (String string) {\r\n\r\ntext = string;\r\n\r\n}\r\n\r\n}\r\n\r\n \r\n\r\nIt is accessed form the following HTML page:\r\n\r\n \r\n\r\n<html>\r\n\r\n<title>Sample Applet</title>\r\n\r\n<body>\r\n\r\n<applet code=\"Sample.class\" width=200 height=200></applet>\r\n\r\n</body>\r\n\r\n</html>\r\n\r\n \r\n\r\nWhat is the result of compiling and running this applet:\r\n\r\nA. Prints \"Hello World\".\r\n\r\nB. Generates a runtime error.\r\n\r\nC. Does nothing.\r\n\r\nD. Generates a compile time error.\r\n\r\n

论坛徽章:
0
2 [报告]
发表于 2002-07-13 11:23 |只看该作者
不过你这个帖子应该贴到java区去,相信在那里早就解决了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP