subject

Consider the following method, which is intended to return true if at least one of the three strings s1, s2, or s3 contains the substring "art".; Otherwise, the method should return false. public static boolean containsArt(String s1, String s2, String s3)
{

String all = s1 + s2 + s3;
return (all. indexOf("art") != -1);

}

Which of the following method calls demonstrates that the method does not work as intended?
Select one:
a. containsArt ("rattrap", "similar", "today")
b. containsArt ("start", "article", "Bart")
c. containsArt ("harm", "chortle", "crowbar")
d. containsArt ("matriculate", "carat", "arbitrary")
e. containsArt ("darkroom", "cartoon", "articulate")
a. containsArt ("rattrap", "similar", "today")

This is because the "art" is found as a combination of "similar" and "today". That is not as intended based upo

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:00
Pthe price of tickets in a group when a purchased in bulk can be found with the equation c=px+24 were c is the cost, p is the number of people,and x is the price per ticket. what is price of of each ticket if it costs $189 to buy tickets for 15 people ? a $8 b $24c $9d $11 show work
Answers: 1
question
Computers and Technology, 22.06.2019 17:30
Working on this program in python 3.7: a year in the modern gregorian calendar consists of 365 days. in reality, the earth takes longer to rotate around the sun. to account for the difference in time, every 4 years, a leap year takes place. a leap year is when a year has 366 days: an extra day, february 29th. the requirements for a given year to be a leap year are: 1) the year must be divisible by 42) if the year is a century year (1700, 1800, the year must be evenly divisible by 400some example leap years are 1600, 1712, and 2016.write a program that takes in a year and determines whether that year is a leap year.ex: if the input is 1712, the output is: 1712 is a leap year. ex: if the input is 1913, the output is: 1913 is not a leap year. your program must define and call the function isleapyear(useryear). the function should return true if the input year is a leap year and false otherwise.
Answers: 1
question
Computers and Technology, 22.06.2019 21:30
Write a function named printfloatrepresentation(float number) that will print the floating point representation of a number using the format given below. (sign bit) exponent in binary (assumed bit).significandfor example if the number passed an argument is 71 yourprogram should print (0) 10000101 (1).00011100000000000000000similarly if the number passed to the function as argument is -71 the program should print (1) 10000101 (1).00011100000000000000000
Answers: 3
question
Computers and Technology, 23.06.2019 04:31
Type the correct answer in the box. spell all words correctly. 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: 1
You know the right answer?
Consider the following method, which is intended to return true if at least one of the three strings...
Questions
question
Mathematics, 03.03.2021 19:00
question
English, 03.03.2021 19:00
question
Mathematics, 03.03.2021 19:00
question
Mathematics, 03.03.2021 19:00