1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Olegator [25]
3 years ago
12

In this problem, you will write three methods to:

Computers and Technology
1 answer:
gulaghasi [49]3 years ago
8 0

Answer:

see explaination for program code

Explanation:

program code below:

class Names{

public static String[] makeNames(String[] array1, String[] array2){

if(array1.length == 0) return array2;

if(array2.length == 0) return array1;

String[] res = new String[array1.length*array2.length];

int k = 0;

for(int i=0;i<array1.length;i++){

for(int j=0;j<array2.length;j++){

res[k++] = array1[i] + " " + array2[j];

}

}

return res;

}

public static String[] makeNames(String[] array1, String[] array2, String[] array3){

return makeNames(makeNames(array1, array2), array3);

}

public static void print(String[] array){

for(String name : array){

System.out.println(name);

}

}

public static void main(String[] args) {

String[] first = {"David", "Mike", "Katie", "Lucy"};

String[] middle = {"A","B", "C", "D", "E"};

String[] last = {};

String[] names = makeNames(first, middle, last);

print(names);

print(names);

}

}

You might be interested in
Why do we use console.log in javascript when changing variables?
Fiesta28 [93]
It helps to debug the code. Instead of going through every line of code to find an error, using console.log can tell us where to look.
8 0
3 years ago
Read 2 more answers
The amount of white space or vertical space between the lines of the text in a paragraph is called line spacing.
jekas [21]

Answer:

It is a true statement .

3 0
3 years ago
Visual culture is an area of academic study that deals with the totality of images and visual objects produced in ____________,
leonid [27]

Answer:

In: industrial and postindustrial nations

5 0
4 years ago
Prior to the world wide web as we know it today, the internet was chaotic, without any ____.
atroni [7]
Search engines - there was no single way to ask a question
5 0
4 years ago
Julie I'm here so help me I'm red
aniked [119]

Answer:

hey hey hey hey hey hey hey hey

Explanation:

hey hey hey hey hey hey hey hey

7 0
4 years ago
Other questions:
  • Write a copy assignment operator for CarCounter that assigns objToCopy.carCount to the new objects's carCount, then returns *thi
    7·1 answer
  • Write the definition of a function divide that takes four arguments and returns no value . The first two arguments are of type i
    8·1 answer
  • How can styles be used in Word? Check all that apply. to standardize the font size of a title in a Word document to standardize
    9·2 answers
  • Which one of the following provides an authentication mechanism that would be appropriate for pairing with a password to achieve
    13·1 answer
  • Using the flowchart diagram, identify the decision point of this solution. Identify vendors. Calculate amount due. Determine dat
    12·2 answers
  • Steve adds a second 1-GB 240-pin DIMM to his PC, which should bring the total RAM in the system up to 2 GB. The PC has an Intel
    14·1 answer
  • A relational database is different from a simple database because it has more than one _____.
    13·1 answer
  • State what’s printed for each println in the code below:
    6·1 answer
  • PLEASE HELP I WILL GIVE BRAINLIEST!!
    8·1 answer
  • Which unknown factor affects prices in the financial markets?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!