Question: What do I have wrong with this code? I get the error The method joinArray(int[], int[]) is undefined for the type Week7 but I am

What do I have wrong with this code? I get the error "The method joinArray(int[], int[]) is undefined for the type Week7" but I am unsure how to fix it.

import java.util.Arrays; public class Week7 { public static void main(String args[]) {

int [] first = {1,2,3, 4};

int [] second = {5,6,7,8};

// combine two arrays

int [] combined = ArrayUtils.addAll(first, second);

System.out.println("First array : " + Arrays.toString(first));

System.out.println("Second array : " + Arrays.toString(second));

System.out.println("Combined array : " + Arrays.toString(combined));

}

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!