creates new ArrayList with the strings in list that are shorter than int length
Im trying to figure out how to write this as Im new to coding and we just started ArrayLists in class.
Im trying to write a method called getShorterThan that recieves an ArrayList of Strings “List” and an integer “Length” and returns a new ArrayList with the strings in the list whose length is shorter than int “Length”.
Im also supposed to use “length()” for the string size.
This isn’t a project just an example to try in our notes but Im not sure how to do this, if someone can explain this to me it’d be wonderful!