Advertisement
joseleonweb

Untitled

Jan 12th, 2021
570
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.49 KB | None | 0 0
  1. import java.util.ArrayList;
  2. public class Student {
  3.     public static void main(String[] args) {
  4.     ArrayList<String> studentNames = new ArrayList();
  5.     addStudents(studentNames);
  6.     }//end method main
  7.    
  8.     static void addStudents(ArrayList studentNames) {
  9.         //Add the names of everyone in your class
  10.         studentNames.add("Mark");
  11.         studentNames.add("Andrew");
  12.         studentNames.add("Beth");
  13.         . . .
  14.     }//end method addStudents
  15. }//end class Student
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement