import java.util.*;
      
// create an empty array list with an initial capacity
ArrayList<String> student_list = new ArrayList<String>(7);

// use add() method to add values in the list
student_list.add("Kian P");
student_list.add("Samuel W");
student_list.add("Evan S");
student_list.add("Calissa T");
student_list.add("Student Name");
  
// Insert Nocolor in 2nd and 4th position in the list 	
student_list.add(1,"2nd Student");	
student_list.add(3,"4th Student");		

// Print out the colors in the ArrayList
for (int i = 0; i < 7; i++)
  {
      System.out.println(student_list.get(i).toString());
  }
Kian P
2nd Student
Samuel W
4th Student
Evan S
Calissa T
Student Name
// create an empty array list with an initial capacity
ArrayList<String> student_list1 = new ArrayList<String>(7);

// use add() method to add values in the list
student_list1.add("New Student");
student_list1.add("New Student 2");
student_list1.add("New Student 3");
student_list1.add("New Student 4");
student_list1.add("New Student 5");
    
// Insert Nocolor in 2nd and 4th position in the list 	
student_list1.add(1,"2nd New Student");	
student_list1.add(3,"4th New Student");		

// Combines the two lists together inside of the student_list
student_list1.addAll(student_list1); 

for (int i = 0; i < 14; i++)
  {
      System.out.println(student_list1.get(i).toString());
  }
New Student
2nd New Student
New Student 2
4th New Student
New Student 3
New Student 4
New Student 5
New Student
2nd New Student
New Student 2
4th New Student
New Student 3
New Student 4
New Student 5
student_list.size();
7
student_list.remove(3); 
for (int i = 0; i < 6; i++)
  {
      System.out.println(student_list.get(i).toString());
  }
Kian P
2nd Student
Samuel W
Evan S
Calissa T
Student Name
student_list.remove("Student Name"); 
for (int i = 0; i < 5; i++)
  {
      System.out.println(student_list.get(i).toString());
  }
Kian P
2nd Student
Samuel W
Evan S
Calissa T
student_list.get(5);
Calissa T
student_list.set(0, "Samuel W");
for (int i = 0; i < 7; i++)
  {
      System.out.println(student_list.get(i).toString());
  }
Samuel W
2nd Student
Samuel W
4th Student
Evan S
Calissa T
Student Name
student_list.indexOf("Calissa T");
5
student_list.equals("Kian P");
false
student_list.hashCode();
-1788816664
ArrayList<String> kianpas_list = new ArrayList<String>(7);
kianpas_list.isEmpty();
true
import java.util.Collections;

// Sorts the string in alphabetical order
Collections.sort(student_list);
for (int i = 0; i < 7; i++)
  {
      System.out.println(student_list.get(i).toString());
  }
2nd Student
4th Student
Calissa T
Evan S
Samuel W
Samuel W
Student Name