Menu
Question Index
...

Write a program to merge the string arrays.

Input (String Array1, String Array2) Output (String Array)
{1, 2, 3, 4, 5, 6, 7}
{Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday}
{1, 2, 3, 4, 5, 6, 7, Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday}
{A, B, C, D}
{Apple, Ball, Cat, Dog, Egg}
{A, B, C, D, Apple, Ball, Cat, Dog, Egg}
{}
{Apple, Ball, Cat, Dog, Egg}
{Apple, Ball, Cat, Dog, Egg}
{}
{}
{}
null
null
null


            
class MergeStringArrays
{
    public static void main(String s[])
    {
        String weekNumbers[] = {"1", "2", "3", "4", "5", "6", "7"};
        String weekNames[] =
        {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
        String[] mergedStrings = mergeStringArrays(weekNumbers,weekNames);
        System.out.print("The merged strings are: ");
        for(String string : mergedStrings){
        System.out.print(string + ", ");
        }

    }


    public static String[] mergeStringArrays(String[] array1, String[] array2)
    {
        String[] result = null;
        return result;
    }

}

Doubts

Problems

Topic: Unknown

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App