Description
Complete the function countNegatives() so that it counts of negative values in the array numbers. You may assume that the...
Searching for: cci
Complete the function countNegatives() so that it counts of negative values in the array numbers. You may assume that the...
Complete the function countStrLongerThan() so that it returns the count of Strings in the array names that are longer than minLen. You...
Complete the function countStrings() so that it returns the count of Strings in the array names that are not null.
Complete the function countStrLongerThan() so that it returns the count of Strings in the array names that are longer than minLen. You...
Declare a String variable, name it student and assign it the value "Malcolm".
Write a function called repeat(s, n) with two parameters, a String s and an int n. The routine should return a string with s repated n...
Write a function untilSpace(s) that returns a substring of s starting at the beginning and extending until a space is found. The space is...
Given an array of integers, return the largest value in the array. Assume the array has only posivitive numbers. If the array is empty,...
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...
Write a function first10(s) that returns the first 10 characters of s. If s is longer than 10 characters, just truncate it. If s is...
Given an array of Strings, return the longest String in the array. If the array is empty, return null.
Complete the class MyClass below by adding a print statement to the run() method. It should print "Hello " followed by the content of the...
What value is stored in myInt after casting happens during the assignment in the second line of code.
double myDouble = 9.55; int myInt =...
What value is stored in myDouble after casting happens during the assignment in the second line of code?
int myInt = 9; double myDouble =...
Write a function fullWords(s) that returns a string no longer than 20 characters. If the string s is longer than 20 characters, just...
Given an array of integers, return the sum of all the values in the array.
Given an array of doubles, return the average of all the values in the array.
Write a function toTitleCase(s) that returns the s converted to Title Case. Title case has each word in the s with its first letter in...
Write a function toTitleCase(s) that returns the s converted to Title Case. Title case has each word in the s with its first letter in...
Complete the function joinStrings() so that it returns a string with all the strings in words concatenated. You should use sep as a...
Complete the function joinStrings() so that it returns a string with all the strings in words concatenated. You may assume that the array...
Given an array of integers, return the first element in the array that is larger than maxVal. Assume the array has only posivitive...
Given an array of integers numbers, return the nth element in the array that is larger than maxVal. Assume the array has only posivitive...
Given an array of integers numbers, return a new array with just the values in numbers that are odd. The new array should just be of the...
Given a size for an array and the initial value, create and return a new int array that is initialized with initial stored in all the...