Write a method named beginsWith that gets an array list of Strings named inputList, and a character named ch and returns an array list of Strings consisting all the words from inputList that starts with the character ch.
import java.util.ArrayList;
public class BeginsWith {
public static ArrayList<String> beginsWith(ArrayList<String> strings, char ch) {
ArrayList<String> result = new ArrayList<String>();
for (int i = 0; i < strings.size(); i++) {
if (strings.get(i).charAt(0) == ch) {
result.add(strings.get(i));
}
}
return result;
}
public static void main(String[] args) {
ArrayList<String> strings = new ArrayList<String>();
strings.add("hello");
strings.add("hi");
strings.add("how");
strings.add("are");
strings.add("you?");
System.out.println(beginsWith(strings, 'h'));
}
}

Write a method named beginsWith that gets an array list of Strings named inputList, and a...
Write a method named avgLength which takes an array of Strings as an input parameter and returns a double. The method should calculate and return the average length of all the strings in the array (in java langauge)
In java please write a method List toList(String[] array) that converts its argument array of strings to a list of strings and then returns it.
Python: Write a function named "sort_by_length" that takes a list/array of strings as a parameter and sorts the strings by their length
JavaScript Write a function named "sort_by_length" that takes a list/array of strings as a parameter and sorts the strings by their length
language is python
Write a function named subsetStrings that has two inputs, a list of strings and an integer n. Your function should use a single list comprehension to create a new list containing the first n characters of each string in the input list if the length of the individual string is at least n (strings that are too short should be skipped). Your function should return the new list ex: inputList 'Frederic, 'powerade', 'spring break, 'pen'] and n-4...
2. Write a function convstrs that will receive a cell array of strings and a character (either 'U' or 'L') as input arguments. If the character is 'U', it will return a new cell array with all of the strings in uppercase. If the character is 'L', it will return a new cell array with all of the strings in lowercase. If the character is neither 'U' nor 'L', or if the cell array does not contain all strings, the...
write a function firstLetterWords(words) that takes as a parameter a list of strings named words and returns a dictionary with lower case letters as keys. But now associate with each key the list of the words in words that begin with that letter. For example, if the list is ['ant', 'bee', 'armadillo', 'dog', 'cat'], then your function should return the dictionary {'a': ['ant', 'armadillo'], 'b': ['bee'], 'c': ['cat'], 'd': ['dog']}.
Write a static method that takes an array of Strings and returns a double. Determine the average number of characters for the Strings assigned to the array. Return the average.
Write a method will accept an array of Strings. This method should return the string that comes after all the other strings in lexicographical order. (Assume all the Strings only contain lower case letters. In Example: No number, no Capitals and no Symbols) lastString({“hola”, “word”, “night”, “boom”}) → “word” lastString({“java”, “is”, “so”, “much”, “fun”}) → “so” lastString({“i”, “love”, “java”}) → “love” //precondition: words.length >0 public static String lastString(String[] words) { }
Write the line that declares a two-dimensional array of strings named chessboard. That is, how would I declare a two-dimension array of strings that is called chessboard? You would declare a String array by saying " String []" correct? Now that's just a single array. How can I make that a two-dimension array? And how would I name it chessboard? Write the line that declare and creates a two-dimensional array of chars, tictactoe, with 3 rows, each with 3 elements...