I have a a method like this :
List < Object > getObjects(List<Integer> ids)
I want to construct a list on the fly (as a parameter) using an integer (say some int a) instead of creating and storing a list in a local variable and then passing it.
List<Integer> intList = new ArrayList<Integer>();
intList.add(a);
getObjects(intList)
How do i do this?