joseleonweb

Untitled

Jan 12th, 2021
460
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.ArrayList;
  2. import java.util.Collections;
  3. public class Student {
  4. public static void main(String[] args) {
  5. ArrayList<String> studentNames = new ArrayList();
  6. addStudents(studentNames);
  7. displayStudents(studentNames);
  8. Collections.sort(studentNames);
  9. displayStudents(studentNames);
  10. }//end method main
  11. static void displayStudents(ArrayList<String> studentNames) {
  12. for(String student: studentNames)
  13. System.out.println("Student Name: " + student);
  14. //endfor
  15. }//end method displayStudents
  16. static void addStudents(ArrayList<String> studentNames) {
  17. }//end method addStudents
  18. }//end class Student
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×