Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to read returned arraylist from another class method

import java.util.ArrayList;
public class numbers {
   private int number1 = 50;
   private int number2 = 100;
   private List<Integer> list;

   public numbers() {
       list = new ArrayList<Integer>();
       list.add(number1);
       list.add(number2);
   }

   public List<Integer> getList() {
       return list;
   }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #read #returned #arraylist #class #method
ADD COMMENT
Topic
Name
2+5 =