subject

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

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 09:20
How to print: number is equal to: 1 and it is odd number number is equal to: 2 and it is even number number is equal to: 3 and it is odd number number is equal to: 4 and it is even number in the console using java using 1 if statement, 1 while loop, 1 else loop also using % to check odds and evens
Answers: 3
question
Computers and Technology, 23.06.2019 23:00
How do you know if the website is secure if you make a purchase
Answers: 2
question
Computers and Technology, 24.06.2019 09:40
Healthy study habits are best described as
Answers: 1
question
Computers and Technology, 24.06.2019 11:00
Under the home tab, where can a user find options to change the bullet style of an outline? in the slides group in the font group in the paragraph group in the drawing group
Answers: 1
You know the right answer?
Consider the following method: public static String joinTogether(int num, String[] arr)
{
Questions
question
Mathematics, 13.01.2021 20:00
question
Mathematics, 13.01.2021 20:00
question
Mathematics, 13.01.2021 20:00
question
Mathematics, 13.01.2021 20:00
question
Mathematics, 13.01.2021 20:00
question
Mathematics, 13.01.2021 20:00
question
Mathematics, 13.01.2021 20:00
Questions on the website: 13722360