I have a legacy code that has everything raw types and I am trying to remove raw types. I have this one ArrayList object that holds String arrays, String objects, Integer objects all into it.
List arLst = new ArrayList();
arlst.add(strngArr) //String Array
arrlst.add(intObj) //Integer Object
arrlst.add(heyItsString) //String Object
How would I parameterize it? Specifically, the addition of the String Array is causing issues for me in specifying any generic type for the Array List. Will appreciate suggestions.
In that case, your only choice is to make it an
ArrayList<Object>(so you can add elements of any reference type).