当前位置:

JAVA认证考试专业语言模拟试题小测天天练6

发表时间:2015/6/8 11:37:18 来源:互联网 点击关注微信:关注中大网校微信
关注公众号

Question: 4

Given the following definition:

String s = story;

Which of the following expressions are legal?

A. s += books;

B. char c = s[1];

C. int len = s.length;

D. String t = s.toLowerCase();

Explanation:

Answer B is not correct for String is a class and can'T be treated as an array of char. Answer C is not correct for s.length() should be used, not s.length.

Correct Answer: A,D 4 of 60

Question: 5

What is the return value of the main() method in Java?

A. String

B. int

C. char

D. void

Explanation:

The main() method in Java returns void.

Correct Answer: D 5 of 60

编辑推荐:

JAVA认证考试报考指南 / 更多JAVA考试模拟试题


(责任编辑:)

2页,当前第1页  第一页  前一页  下一页
最近更新 考试动态 更多>

考试科目