joseleonweb

Untitled

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