How to put indexes of characters in a string in an array in java : <p>I want to make a method that returns an ArrayList and takes two arguments, one is a string and other is a character. I want to put in ArrayList all the indexes of the characters if they appear in string argument. For example, if a first parameter is a String "hello" and other is 'l' the Array should contain 2 and 3</p>
