JAVA题库:5道JAVA题

文章作者 100test 发表时间 2007:03:14 17:34:45
来源 100Test.Com百考试题网


module 1 – getting started
q1.what will happen when you compile and run the following code?
(4)
public class myclass{
static int i.
public static void main(string argv[]){
system.out.println(i).
}
}
1) error variable i may not have been initialized
2) null
3) 1
4) 0
q2.which of the following will compile without error (2)(3)
1)
import java.awt.*.
package mypackage.
class myclass {}
2)
package mypackage.
import java.awt.*.
class myclass{}
3)
/*this is a comment */

package mypackage.
import java.awt.*.
class myclass{}


相关文章


敏捷开发技巧:以用户故事管理项目一
考SCJP的失败经历
台湾SUN的一位scea讲师介绍SCEA
花二十分钟教你Ruby快速入门(二)
JAVA题库:5道JAVA题
排序和金额转换·两道JAVA编程题及答案
技巧心得:SCJP学习指南
花二十分钟教你Ruby快速入门(一)
JNI调用C_C 方法从控制台输入密码
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛