Computers and Technology

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)

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 08:40, baue4431
What are the three parts to physical security standards for various types of army equipment and the risk level
Answers: 2
image
Computers and Technology, 22.06.2019 21:00, raquelle66
So im doing this school challenge and the teachers said whats the average text a student gets a day so i need to get about 20 in a day but dont know how can you guys 2163371293
Answers: 2
image
Computers and Technology, 22.06.2019 21:40, tdahna0403
Develop a function to create a document in the mongodb database “city” in the collection “inspections.” be sure it can handle error conditions gracefully. a. input -> argument to function will be set of key/value pairs in the data type acceptable to the mongodb driver insert api call b. return -> true if successful insert else false (require a screenshot)
Answers: 2
image
Computers and Technology, 23.06.2019 15:00, Siris420
Plz ( which is an example of a good url?
Answers: 1
Do you know the correct answer?
Consider the following declaration: String s = "cat";
Which of the following statements assi...

Questions in other subjects:

Konu
Mathematics, 25.08.2019 15:10
Konu
Mathematics, 25.08.2019 15:10
Konu
Mathematics, 25.08.2019 15:10