subject

Consider the following declaration: String s = "cat";
Which of the following statements assigns the number of characters in s to k?

A. int k = s. length;
B. int k = s. length();
C. int k = s. size;
D. int k = s. size();

Consider the following declarations:
String s1 = "apple";
String s2 = "apple";
What is the result of s1.compareTo(s2)?

A. true
B. false
C. 0
D. 1

Consider the following declarations:
String s1 = "apple";
String s2 = "APPLE";
Which of the following expressions is true?

A. s1.equals(s2) && s1.equalsIgnoreCase(s2)
B. !s1.equals(s2) && s1.equalsIgnoreCase(s2)
C. s1.equals(s2) && !s1.equalsIgnoreCase(s2)
D. !s1.equals(s2) && !s1.equalsIgnoreCase(s2)

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:30
The most common battery cable terminal is a that provides a large surface contact area with the ability to tighten the terminal onto the battery post using a nut and bolt.
Answers: 2
question
Computers and Technology, 23.06.2019 08:00
The managing director of a company sends a christmas greeting to all his employees through the company email. which type of network does he use? he uses an .
Answers: 3
question
Computers and Technology, 23.06.2019 10:30
How would you categorize the software that runs on mobile devices? break down these apps into at least three basic categories and give an example of each.
Answers: 1
question
Computers and Technology, 25.06.2019 01:40
The instantiation of an endpoint in a potential tcp connection is know as
Answers: 1
You know the right answer?
Consider the following declaration: String s = "cat";
Which of the following statements assi...
Questions
question
Mathematics, 31.08.2019 07:10
question
Biology, 31.08.2019 07:10
question
Biology, 31.08.2019 07:10
Questions on the website: 13722360