Exercises

0 / 10

This method takes an ArrayList of integers as a parameter and does not return anything. The method will expand the list with a mirrored...

0 / 20

This method takes an ArrayList of integers as a parameter and does not return anything. The method will remove all of the odd elements in...

0 / 20

This method takes an ArrayList of integers as a parameter and does not return anything. The method will repeat each odd element in the...

0 / 20

Write a function in Java called factorial(int n) that will take a positive integer as input and returns its factorial as output. You will...

0 / 10

What type of error found on line 3?

public static int minVal(int[] y, int first, int last) { int bestSoFar = y[first]; // line 1 for (int...
0 / 10

What is the value of variable donuts after the following code executes?

int donuts = 6; donuts = donuts + 3; donuts = donuts * donuts; 
0 / 10

Complete the function getArraySize() so that it returns the size of the array passed in as an argument into the function. You cannot use...