How to declare list in java action call

Hey guys need your help here, how should I declare a list of BatchList entitiy. 
1 answers

You firstly need to create a list of IMendixObject. Then you create your Mendix entities and add them to the list as MendixObjects. Finally you return them from the Java Action.

Here is some example code that should help you.

// Create the List
List<IMendixObject> returnList = new ArrayList<IMendixObject>();

// Create a new BatchList entity
BatchList batchList = new BatchList(getContext());
batchList.setMachineName("Test Machine");
batchList.setPlantName("Test Plant");

// Add to the List

// Return the List from the Java Action
return returnList;

Good luck!