Advertisement
Guest User

Untitled

a guest
Apr 20th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. import java.util.ArrayList;
  2.  
  3. public class ForEachPractice {
  4.  
  5. public static void printList(ArrayList<Integer>list) {
  6.  
  7. }
  8.  
  9. public static void main(String[] args) {
  10. // TODO Auto-generated method stub
  11. ArrayList<Integer>listy = new ArrayList<Integer>();
  12. listy.add(4);listy.add(3);listy.add(2);listy.add(1);
  13. listy.add(8);listy.add(66);listy.add(88);listy.add(14);
  14. printList(listy);
  15. }
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement