Use a second ArrayList for the 3 strings, not a primitive array. Ie.
private List<List<String>> addresses = new ArrayList<List<String>>();

Then you can have:

ArrayList<String> singleAddress = new ArrayList<String>();
singleAddress.add("17 Fake Street");
singleAddress.add("Phoney town");
singleAddress.add("Makebelieveland");

addresses.add(singleAddress);

(I think some strange things can happen with type erasure here, but I don't think it should matter here)

If you're dead set on using a primitive array, only a minor change is required to get your example to work. As explained in other answers, the size of the array can not be included in the declaration. So changing:

private ArrayList<String[]> addresses = new ArrayList<String[3]>();

to

private ArrayList<String[]> addresses = new ArrayList<String[]>();

will work.

Answer from Grundlefleck on Stack Overflow
🌐
W3Schools
w3schools.com › java › java_arraylist.asp
Java ArrayList
Elements in an ArrayList are actually objects. In the examples above, we created elements (objects) of type "String". Remember that a String in Java is an object (not a primitive type).
🌐
Programiz
programiz.com › java-programming › examples › arraylist-string-conversion
Java Program to Convert the ArrayList into a string and vice versa
import java.util.ArrayList; class ...JavaScript"); System.out.println("ArrayList: " + languages); // convert the arraylist into a string String arraylist = languages.toString(); System.out.println("String: " + arraylist); } }...
🌐
Programiz
programiz.com › java-programming › arraylist
Java ArrayList (With Examples)
Here is how we can create arraylists in Java: ... Here, Type indicates the type of an arraylist. For example, // create Integer type arraylist ArrayList<Integer> arrayList = new ArrayList<>(); // create String type arraylist ArrayList<String> arrayList = new ArrayList<>();
🌐
Vultr
docs.vultr.com › java › standard-library › java › util › ArrayList › toString
Java ArrayList toString() - Convert To String | Vultr Docs
November 19, 2024 - The toString() method in Java's ArrayList class is a convenient way to convert the entire contents of the ArrayList into a single String.
🌐
GeeksforGeeks
geeksforgeeks.org › java › arraylist-in-java
ArrayList in Java - GeeksforGeeks
ArrayList<String> arr = new ArrayList<>(collection); This constructor is used to build an array list with the initial capacity being specified. ... Now, Using the constructors we have got ArrayList for further operations like Insertion,Deletion ...
Published   May 12, 2026
Find elsewhere
🌐
Vultr Docs
docs.vultr.com › java › examples › convert-the-arraylist-into-a-string-and-vice-versa
Java Program to Convert the ArrayList into a string and vice versa | Vultr Docs
December 19, 2024 - Convert the ArrayList to a String using the toString() method. ... import java.util.ArrayList; public class Main { public static void main(String[] args) { ArrayList<String> list = new ArrayList<>(); list.add("Java"); list.add("Python"); ...
🌐
Programiz
programiz.com › java-programming › library › arraylist › tostring
Java ArrayList toString()
Here, we have used the toString() method to convert the arraylist into a string.
🌐
GeeksforGeeks
geeksforgeeks.org › java › convert-an-arraylist-of-string-to-a-string-array-in-java
Convert an ArrayList of String to a String Array in Java - GeeksforGeeks
July 11, 2025 - In Java, as we all know ArrayList class is derived from the List interface. Here we are given an ArrayList of strings and the task is to convert the ArrayList to a string array.
🌐
Baeldung
baeldung.com › home › java › java string › convert an arraylist of string to a string array in java
Convert an ArrayList of String to a String Array in Java | Baeldung
March 7, 2025 - In this tutorial, we’ll explore how to accomplish this conversion seamlessly using Java’s built-in methods and techniques. An example can help us to understand the problem quickly. Let’s say we have the following ArrayList, which contains some artists’ names: static final List<String> INPUT_LIST = Lists.newArrayList("Michael Bolton", "Michael Jackson", "Guns and Roses", "Bryan Adams", "Air Supply");
🌐
Dot Net Perls
dotnetperls.com › arraylist-java
Java - ArrayList Examples - Dot Net Perls
import java.util.ArrayList; public class Program { public static void main(String[] args) { // Create an ArrayList. ArrayList<String> list = new ArrayList<>(); list.add("Venus"); // [0] list.add("Mars"); // [1] list.add("Earth"); // [2] // Set index 0 to a new String.
🌐
Baeldung
baeldung.com › home › java › java array › how to add string arrays to arraylist in java
How to Add String Arrays to ArrayList in Java | Baeldung
March 7, 2025 - final static String[] ARRAY1 = { "Java", "Kotlin", "Sql", "Javascript" }; final static String[] ARRAY2 = { "C", "C++", "C#", "Typescript" }; final static String[] ARRAY3 = { "Python", "Ruby", "Go", "Rust" }; Also, we have a method to produce a String List with two String elements: List<String> initLanguageList() { List<String> languageList = new ArrayList<>(); languageList.add("Languages"); languageList.add(":"); return languageList; }
🌐
GeeksforGeeks
geeksforgeeks.org › java › how-to-convert-a-string-to-arraylist-in-java
How to Convert a String to ArrayList in Java? - GeeksforGeeks
July 23, 2025 - We can easily convert String to ArrayList in Java using the split() method and regular expression.
🌐
Oracle
docs.oracle.com › javase › 8 › docs › api › java › util › ArrayList.html
ArrayList (Java Platform SE 8 )
April 21, 2026 - Java™ Platform Standard Ed. 8 ... public class ArrayList<E> extends AbstractList<E> implements List<E>, RandomAccess, Cloneable, Serializable
🌐
BeginnersBook
beginnersbook.com › 2013 › 12 › java-arraylist
ArrayList in Java With Examples
You can use the set method to change an element in ArrayList. You need to provide the index and new element, this method then updates the element present at the given index with the new given element. In the following example, we have given the index as 0 and new element as “Lucy” in the set() method. The method updated the element present at the index 0 (“Jim”) with the new String element “Lucy”. import java.util.ArrayList; public class JavaExample { public static void main(String[] args) { ArrayList<String> names = new ArrayList<String>(); names.add("Jim"); names.add("Jack"); names.add("Ajeet"); names.add("Chaitanya"); names.set(0, "Lucy"); System.out.println(names); } }
🌐
Medium
medium.com › @Bharat2044 › what-is-arraylist-in-java-and-how-to-create-and-all-predefined-methods-and-different-ways-to-print-fa3cc9f86f8b
What is ArrayList in java and how to create and all predefined methods and different ways to print ArrayList element? | by Bharat | Medium
April 3, 2024 - import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class Main { public static void main(String[] args) { List<String> existingList = Arrays.asList("item1", "item2", "item3"); ArrayList<String> arrayList = new ArrayList<>(existingList); System.out.println(arrayList); // Output: [item1, item2, item3] } }