Search Results

Searching for: Java

Individual Exercises

0 / 40

This method takes a String object as a parameter and returns a compressed version of the object. The method compresses the String by...

0 / 20

This methods takes a String object as a parameter and returns an encrypted version of the object. The encryption is done in two steps:...

0 / 10

This method simulates flipping a fair coin. It takes an integer parameter, which specifies the number of times that the coin is to be...

0 / 20

This method simulates flipping a fair coin. The coin is flipped repeatedly until three heads are seen. The method takes an integer...

0 / 10

this method accepts a String object as a parameter. It returns true if the String has all unique characters, false otherwise. For...

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...