- 218
- 0
- 约6.33千字
- 约 7页
- 2017-12-31 发布于河北
- 举报
JAVA笔试题(笔试时间60分钟).doc
JAVA笔试题(笔试时间60分钟)
一、每道题可能包括一个或者多个正确答案(每小题3分,总计60分)
1.选择编译运行下列代码时的运行结果。
public class MyClass {public static void main(String arguments[]){amethod(arguments);}public void amethod(String[] arguments){System.out.println(arguments);System.out.println(arguments[1]);}}A) error Cant make static reference to void amethod.;
B) error method main not correct
C) error array must include parameter
D) amethod must be declared with String
2.下列哪些代码段可以通过编译。
A)import java.awt.*;package Mypackage;class Myclass {}B) package MyPackage;import java.awt.*;class MyClass{}C) /*This is a comment */pac
原创力文档

文档评论(0)