题目内容

"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'

The __________ method parses a string s to an int value.

A. Integer.parseInteger(s);
B. integer.parseInt(s);
C. integer.parseInteger(s);
D. Integer.parseInt(s);

答案查题题库