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 23:00
Which factor is the most important when choosing a website host? whether customers will make secure transactions the number of email accounts provided the purpose of the website the quality of the host control panel
Answers: 3
question
Computers and Technology, 23.06.2019 06:30
To become an audio technician, the most successful tactics might include the following. (select all that apply). learning how to persuade other people gaining different types of experience in audio technology learning as much as possible about art history establishing a reputation as a reliable professional
Answers: 1
question
Computers and Technology, 24.06.2019 18:50
Which style did jack use on the vocabulary words in reports?
Answers: 2
question
Computers and Technology, 24.06.2019 21:40
Clunker motors inc. is recalling all vehicles in its extravagant line from model years 1999β€”2002 as well as all vehicles in its guzzler line from model years 2004β€”2007. a boolean variable named recalled has been declared. given a variable modelyear and a string modelname, write a statement that assigns true to recalled if the values of modelyear and modelname match the recall details and assigns false otherwise.
Answers: 2
You know the right answer?
Consider the following declaration: String s = "cat";
Which of the following statements assi...
Questions
question
Social Studies, 23.10.2020 21:30
question
Physics, 23.10.2020 21:30
question
Mathematics, 23.10.2020 21:30
question
History, 23.10.2020 21:30
question
Mathematics, 23.10.2020 21:30
question
Mathematics, 23.10.2020 21:30
question
Mathematics, 23.10.2020 21:30