Guest User

Untitled

a guest
Oct 19th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. public class ProuductList {
  2. private ArrayList<String> productList = new ArrayList<>;
  3.  
  4. public void populateList() {
  5. productList.add("123");
  6. productList.add("456");
  7. }
  8.  
  9. public ArrayList<String> getProductList() {
  10. return productList;
  11. }
  12. }
  13.  
  14. public class InvenDriver {
  15. private ProductList productList;
  16.  
  17. public InvenDriver() {
  18. productList = new ProductList();
  19. productList.populateList();
  20. //To use the list productList.getProductList();
  21. }
  22. }
Add Comment
Please, Sign In to add comment