Browse W
Alphabetical listing with fast deep pagination.
66619 items • Page 1030 / 1333
Write a method called filterRange that accepts an ArrayList of integers and two
Write a method called filterRange that accepts an ArrayList of integers and two integer values min and max as parameters and removes all elements whose values are in the range min…
Write a method called findCommon that takes three arrays of positive integers as
Write a method called findCommon that takes three arrays of positive integers as parameters. The first two array parameters are filled with ints. Fill the third array parameter wi…
Write a method called findCommon that takes three arrays of positive integers as
Write a method called findCommon that takes three arrays of positive integers as parameters. The first two array parameters are filled with ints. Fill the third array parameter wi…
Write a method called flipLines that accept a scanner for an input file and writ
Write a method called flipLines that accept a scanner for an input file and writes to the console the same file's contents with each pair of lines reversed in order. If the file c…
Write a method called getHiLo() that takes an Stack of Integers of any length as
Write a method called getHiLo() that takes an Stack of Integers of any length as its only parameter, and returns a new Stack of Integers that has a length of only 2. The top value…
Write a method called getNameArray that takes an integer parameter (numNames), r
Write a method called getNameArray that takes an integer parameter (numNames), returns an array of Strings, and is declared to throw an Exception. If the parameter passed is a neg…
Write a method called inputStats that accepts a Scanner representing an input fi
Write a method called inputStats that accepts a Scanner representing an input file and reports for each line its line position, the number of tokens in that line, and the length o…
Write a method called interleave that accepts two ArrayLists of integers a1 and
Write a method called interleave that accepts two ArrayLists of integers a1 and a2 as parameters and inserts the elements of a2 into a1 at alternating indexes. If the lists are of…
Write a method called interleave that accepts two ArrayLists of integers a1 and
Write a method called interleave that accepts two ArrayLists of integers a1 and a2 as parameters and inserts the elements of a2 into al a1 alternating indexes. If the lists are of…
Write a method called is Unique that accepts an array of integers as a parameter
Write a method called is Unique that accepts an array of integers as a parameter and returns a boolean value indicating whether or not the values in the array are unique (true for…
Write a method called isSorted that returns true if the list is in sorted (nonde
Write a method called isSorted that returns true if the list is in sorted (nondecending) order and returns false otherwise. An empty list is considered to be sorted. Please implem…
Write a method called isSorted that takes an array of doubles as a parameter and
Write a method called isSorted that takes an array of doubles as a parameter and returns true if the list is in sorted (non-decreasing) order and returns false otherwise. For exam…
Write a method called isUnique that accepts array of integers as a parameter and
Write a method called isUnique that accepts array of integers as a parameter and returns a boolean value indicating whether or not the values in the array are unique (true for yes…
Write a method called kthLargest that accepts an integer k and an array a as its
Write a method called kthLargest that accepts an integer k and an array a as its parameters and returns the element such that k elements have greater or equal value. If k = 0, ret…
Write a method called kthLargest that accepts an integer k and an array a as its
Write a method called kthLargest that accepts an integer k and an array a as its parameters and returns the element such that k elements have greater or equal value. If k = 0, ret…
Write a method called linearSearch that receives as input a variable, a, of type
Write a method called linearSearch that receives as input a variable, a, of type String array (String[]), as well as a target variable denoted t. Your method should iterate throug…
Write a method called logicAnd that accepts as parameters two arrays of integer
Write a method called logicAnd that accepts as parameters two arrays of integer (A and B) and returns another array of integer (C). C[i] = 1 if B[i] divides A[i], otherwise C[i]=0…
Write a method called makeLine . The method receives an int parameter that is gu
Write a method called makeLine . The method receives an int parameter that is guaranteed not to be negative and a character . The method returns a String whose length equals the p…
Write a method called makeLine . The method receives an int parameter that is gu
Write a method called makeLine . The method receives an int parameter that is guaranteed not to be negative and a character. The method returns a String whose length equals the pa…
Write a method called makeLine . The method receives an int parameter that is gu
Write a method called makeLine . The method receives an int parameter that is guaranteed not to be negative and a character. The method returns a String whose length equals the pa…
Write a method called makePerfect that adds nodes until the binary tree is a per
Write a method called makePerfect that adds nodes until the binary tree is a perfect tree. A perfect binary tree is one where all leaves are at the same level. Another way of thin…
Write a method called makePerfect that adds nodes until the binary tree is a per
Write a method called makePerfect that adds nodes until the binary tree is a perfect tree. A perfect binary tree is one where all leaves are at the same level. Another way of thin…
Write a method called makeStars . The method receives an int parameter that is g
Write a method called makeStars . The method receives an int parameter that is guaranteed not to be negative. The method returns a String whose length equals the parameter and con…
Write a method called makeStars . The method receives an int parameter that is g
Write a method called makeStars . The method receives an int parameter that is guaranteed not to be negative. The method returns a String whose length equals the parameter and con…
Write a method called matmul that takes as arguments two matrices of doubles: do
Write a method called matmul that takes as arguments two matrices of doubles: double[][] A and double[][] B, and returns the matrix that represents the multiplication of the two a…
Write a method called median that accepts an array of integers as its argument a
Write a method called median that accepts an array of integers as its argument and returns the median of the numbers in the array. The median is the number that will appear in the…
Write a method called median that accepts an array of integers as its argument a
Write a method called median that accepts an array of integers as its argument and returns the median of the numbers in the array. The median is the number that will appear in the…
Write a method called median that accepts an array of integers as its argument a
Write a method called median that accepts an array of integers as its argument and returns the median of the numbers in the array. The median is the number that will appear in the…
Write a method called median that accepts an array of integers as its argument a
Write a method called median that accepts an array of integers as its argument and returns the median of the numbers in the array. The median is the number that will appear in the…
Write a method called median that accepts an array of integers as its argument a
Write a method called median that accepts an array of integers as its argument and returns the median of the numbers in the array. The median is the number that will appear in the…
Write a method called min that returns the minimum value in a list of integers.
Write a method called min that returns the minimum value in a list of integers. If the list is empty, it should throw a NoSuchElementException. Please implement the list with thes…
Write a method called mult30 that takes a single integer parameter that is great
Write a method called mult30 that takes a single integer parameter that is greater than or equal to 0, and calculates x n by using the following recursive formula: mult30 is to be…
Write a method called negativeSum that accepts a Scanner reading input from a fi
Write a method called negativeSum that accepts a Scanner reading input from a file containing a series of integers, and print a message to the console indicating whether the sum s…
Write a method called numRemainderMatches which retruns an int, takes an array o
Write a method called numRemainderMatches which retruns an int, takes an array of integers as its first parameter and a single positive digit (int) as its second parameter. It lo…
Write a method called playListBuilder that takes no parameters and returns an Ar
Write a method called playListBuilder that takes no parameters and returns an ArrayList of Strings (song names). In the method body, declare an ArrayList of Strings called playLis…
Write a method called power the computes x^n where x and n and positive integers
Write a method called power the computes x^n where x and n and positive integers. The method has two integer parameters and returns a value of type long. Create a class named Appo…
Write a method called printAverage that uses a sentinel-loop to repeatedly promp
Write a method called printAverage that uses a sentinel-loop to repeatedly prompt the user for numbers. Once the user types any number less than zero, the method should display th…
Write a method called printNumbers that accepts a maximum number as an argument
Write a method called printNumbers that accepts a maximum number as an argument and prints each number from 1 up to that maximum, inclusive, boxed by square brackets. For example,…
Write a method called printPalindrome that accepts a Scanner for the console as
Write a method called printPalindrome that accepts a Scanner for the console as a parameter, and prompts the user to enter one or more words and prints whether the entered String …
Write a method called printPalindrome that accepts a Scanner for the console as
Write a method called printPalindrome that accepts a Scanner for the console as a parameter, and prompts the user to enter one or more words and prints whether the entered String …
Write a method called printPalindrome that accepts a Scanner for the console as
Write a method called printPalindrome that accepts a Scanner for the console as a parameter, and prompts the user to enter one or more words and prints whether the entered String …
Write a method called printPowersOf2 that accepts a maximum number as an argumen
Write a method called printPowersOf2 that accepts a maximum number as an argument and prints each power of 2 from 20 (1) up to that maximum power, inclusive. For example, consider…
Write a method called printPowersOfN that accepts a base and an exponent as argu
Write a method calledprintPowersOfNthat accepts a base and an exponent as arguments and prints each power of the base from base0(1) up to that maximum power, inclusive. For exampl…
Write a method called printRange that accepts two integers as arguments and prin
Write a method called printRange that accepts two integers as arguments and prints the sequence of numbers between the two arguments, separated by spaces. Print an increasing sequ…
Write a method called printRange that accepts two integers as arguments and prin
Write a method called printRange that accepts two integers as arguments and prints the sequence of numbers between the two arguments, enclosed in square brackets. Print an increas…
Write a method called printSquare that takes in two integer parameters, a min an
Write a method called printSquare that takes in two integer parameters, a min and a max, and prints the numbers in the range from min to max inclusive in a square pattern. The squ…
Write a method called printSquare that takes in two integer parameters, a min an
Write a method called printSquare that takes in two integer parameters, a min and a max, and prints the numbers in the range from min to max inclusive in a square pattern. The squ…
Write a method called printSquare that takes in two integer parameters, a min an
Write a method called printSquare that takes in two integer parameters, a min and a max, and prints the numbers in the range from min to max inclusive in a square pattern. The squ…
Write a method called printTriangleType that accepts three integer arguments rep
Write a method called printTriangleType that accepts three integer arguments representing the lengths of the sides of a triangle and prints what type of triangle it is. The three …
Write a method called quadratic that solves quadratic equations and prints their
Write a method called quadratic that solves quadratic equations and prints their roots. Recall that a quadratic equation is a polynomial equation in terms of a variable x of the f…