Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.ArrayList;
- public class Student {
- public static void main(String[] args) {
- ArrayList<String> studentNames = new ArrayList();
- addStudents(studentNames);
- }//end method main
- static void addStudents(ArrayList studentNames) {
- //Add the names of everyone in your class
- studentNames.add("Mark");
- studentNames.add("Andrew");
- studentNames.add("Beth");
- . . .
- }//end method addStudents
- }//end class Student
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement