Drill & Practice: Arrays (Java Review)

Score: 0 / 30.0


Exercises

0 / 1.0

Given two int arrays a and b, each with two elements, return a new array with four elements containing all the elements of a followed by...

0 / 1.0

Given an int array of any length, return a new array of its first 2 elements. If the array is smaller than length 2, use whatever...

0 / 1.0

Given an array of ints, return true if every element is either a 1 or a 4. Otherwise, return false.

0 / 1.0

Given an array of integers, return the largest value in the array. Assume the array has only posivitive numbers. If the array is empty,...

0 / 1.0

Given an array of ints, return the smallest value in the array. Assume the array has only posivitive numbers. If the array has no values...

0 / 1.0

Write a method repeated that returns true if the parameter lookFor appears more than one time in the array elements. It should return...

0 / 1.0

Write a method unique that returns true if the parameter lookFor appears only one time (i.e., it is unique) in the array elements. It...

0 / 1.0

Write a method missing that returns true if the parameter lookFor is missing in the array elements. It should return false if lookFor...

0 / 1.0

Write a method duplicate that returns true if the parameter lookFor appears exactly 2 times in the array elements. It should return false...