I have three methods:
Method1:
public static void method1() {
// call method 2 that returns a list
method2();
// call method 3 and pass list retuned from method 2
method3(myList);
}
Method 2:
private static list<objName> method2() {
List<objName> myList = new List<objName>();
// remaining code
return myList;
}
Method 3:
public static Map<x,y> method3(List<myObj> myList) {
// other code
}
My question is: inside method1, how can I pass the list that is returned from method2 into method3?