Computers and Technology
Computers and Technology, 12.04.2021 01:00, jacoblarr

Consider the following method: public static String joinTogether(int num, String[] arr)
{
String result = "";
for (String x : arr)
{
result = result + x. substring(0, num);
}
return result;
}

The following code appears in another method in the same class:
String[] words = {"dragon", "chicken", "gorilla"};
int number = 4;
System. out. println(joinTogether(number, words));

What is printed when the code above is executed?
a. dragonchickengorilla
b. drachigor
c. dragchicgori
d. dragochickgoril
e. There is an error in the program, it does not run


Consider the following method:

public static String joinTogether(int num, String[] arr)
{
String

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 08:00, wgdelgado
What is the first step in creating a maintenance ?
Answers: 2
image
Computers and Technology, 22.06.2019 19:00, trintrin227
In he example code, what does the title attribute create? a tool tip an element a source a markup
Answers: 1
image
Computers and Technology, 23.06.2019 05:30, savyblue1724707
Sally is editing her science report about living things. she needs to copy a paragraph from her original report. order the steps sally needs to do to copy the text to her new document.
Answers: 1
image
Computers and Technology, 23.06.2019 09:30, nsjcbdhcb
Light travels at a speed of 186,000 miles a second. the distance light travels in a year is 5,865,690,000,000 miles/year 5,865,695,000,000 miles/year 58,656,950,000,000 miles/year 6,789,000,0000 miles/year
Answers: 1
Do you know the correct answer?
Consider the following method: public static String joinTogether(int num, String[] arr)
{

Questions in other subjects:

Konu
Mathematics, 15.10.2020 09:01