Gregory Woods has worked at UBERDOC, Inc. since 2022 as a Sales Development Representative. Prior to that, they were employed at Patients First Foundation from 2021 as an SDR.
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.mycompany.mavenproject1;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author santi
*/
public class ArrayListExample {
public static void main(String[] args) {
List<String> list = new ArrayList<String>();
list.add("Hello");
list.add("World");
list.add("HAHAHAHAHA");
//Print all elements
for(String str : list){
System.out.println(str);
}
//Remove elements
list.remove(1);
//Print all elements
for(String str : list){
System.out.println(str);
}
}
}
Links
Sign up to view 0 direct reports
Get started