题目内容

The expression "Java" + 1 + 2 + 3 evaluates to ________.

A. Illegal expression
B. java 123
C. Java6
D. Java123

查看答案
更多问题

"ab".compareTo("aB") is _________.

A. less than 0
B. greater than 0
C. equal to 0
D. less than or equal to 0

Suppose s1 and s2 are two strings. What is the result of the following code? s1.equals(s2) == s2.equals(s1)

A. false
B. true

Which of the following is the correct statement to return JAVA?

A. String.toUpperCase("Java")
B. "Java".toUpperCase("Java")
C. toUpperCase("Java")
D. "Java".toUpperCase()

Suppose s is a string with the value "java". What will be assigned to x if you execute the following code? char x = s.charAt(4);

A. 'v'
B. Nothing will be assigned to x, because the execution causes the runtime error StringIndexOutofBoundsException.
C. 'a'

答案查题题库