You have forgotten to give the variable a name? Both of these work.

Use with AIString[][] array = {emptyArr, filledArr, moreFilledArr};
Use with AIString[][] array = new String[][] {emptyArr, filledArr, moreFilledArr};

I recommend you to go through the basic Java syntax specification and tutorials. Start with The Java Tutorials by Oracle Corp, free of cost.

Answer from Nikolas on Stack Overflow
🌐
GeeksforGeeks
geeksforgeeks.org › java › string-arrays-in-java
String Arrays in Java - GeeksforGeeks
October 2, 2025 - So generally we have three ways to iterate over a string array. The first method is to use a for-each loop. The second method is using a simple for loop. And the third method is to use a while loop.
🌐
W3Schools
w3schools.com › java › java_arrays.asp
Java Arrays
Arrays are used to store multiple values in a single variable, instead of declaring separate variables for each value.
🌐
CodeGym
codegym.cc › java blog › java arrays › string array in java
String Array in Java
May 11, 2023 - Note that in all cases, you have to specify the type of the array (in this case, String) while declaring the variable. In Java you can iterate through a String array using a loop. It could be for or a foreach construction.
🌐
Edureka
edureka.co › blog › string-array-in-java
Java String Array | String Array in Java with Examples | Edureka
July 5, 2024 - An array is a fundamental and crucial data structure Java programming language. It is highly used by programmers due to its efficient and productive nature. A Java String Array is an object that holds a fixed number of String values.
🌐
DigitalOcean
digitalocean.com › community › tutorials › java-string-array
Java String Array: Declaration, Initialization & Examples | DigitalOcean
August 3, 2022 - Master Java String arrays with declaration, initialization, and manipulation examples. Learn iteration, sorting, searching, and conversion techniques.
🌐
Udemy
blog.udemy.com › home › it & development › software development › introduction to the string array: java tutorial
Introduction to the String Array: Java Tutorial - Udemy Blog
April 14, 2026 - Traversing a String type array is an extremely simple process. The most efficient process for traversing the elements of a String type array in java is using loops. For this purpose, a for-loop can be used that loops from 0 to the total length of array -1 index.
Find elsewhere
🌐
Software Testing Help
softwaretestinghelp.com › home › java › java string array- tutorial with code examples
Java String Array- Tutorial With Code Examples
April 1, 2025 - In this section, let’s see the various methods to add an element to the string array. In this method, you create an array having a larger size. For Example, if you have to store 5 elements in the array, then you will create an array with size 10. This way you can easily add new elements at the end of the array. An example that implements the addition of an element to the Pre-allocated array is shown below. import java.util.*; public class Main { public static void main(String[] args) { String[] colorsArray = new String[5]; // initial array values colorsArray[0] = "Red"; colorsArray[1] = "Gre
🌐
Board Infinity
boardinfinity.com › blog › string-array-in-java
String Array in Java | Board Infinity
August 20, 2025 - A definite number of items of the string type make up a string array. Three methods exist for increasing the number of elements in a string array: pre-allocation, in which the array's size is increased so that values can be added later; construction; and use of the Java ArrayList class of the Collections Framework.
🌐
Whitman College
whitman.edu › mathematics › java_tutorial › java › nutsandbolts › arraysAndStrings.html
Arrays and Strings
Like other programming languages, Java allows you to collect and manage multiple values through an array object. Also, you manage data comprised of multiple characters through a String object.
🌐
BeginnersBook
beginnersbook.com › 2022 › 08 › string-array-in-java
String Array in Java
October 25, 2022 - Here, we are demonstrating how to sort a string array. It is simple, just import java.util.Arrays package to use the sort() method of Arrays class.
🌐
Hero Vired
herovired.com › learning-hub › blogs › string-array-in-java
String Array in Java: How to Declare, Example, Initializing
October 7, 2024 - The syntax for declaring and initializing a String Array is very simple. We can declare an array with square brackets and list each piece directly or assign the values from another source, such as a file or database. Also, wrapper class in java provides several methods for working with java string arrays.
🌐
Unstop
unstop.com › home › blog › string array in java | create, operations & more (+examples)
String Array In Java | Create, Operations & More (+Examples)
January 15, 2025 - A string array in Java is a fixed-size collection of strings stored in indexed positions. It allows accessing, modifying, and managing string values efficiently.
🌐
Upgrad
upgrad.com › home › blog › software development › string array in java: java string array with coding examples
String Array In Java: Java String Array With Coding Examples | upGrad blog
August 11, 2026 - This means that users can define ‘String Array’ as an array that holds a certain number of string values or strings. In other words, it refers to a structure that is widely used in Java for having the string value.
🌐
Scaler
scaler.com › home › topics › string array in java
String Array in Java - Scaler Topics
April 28, 2024 - There are various methods for converting them from an array to a string. Let us discuss them one by one. Java's toString() method takes an array and returns its string representation.
🌐
freeCodeCamp
freecodecamp.org › news › string-to-array-in-java-how-to-convert-a-string-to-an-array-in-java
String to Array in Java – How to Convert Strings to Arrays
July 6, 2023 - Performance: Creating a new character array and copying the characters can introduce some performance overhead compared to other methods, especially for long strings. The split() method in Java is a convenient way to split a string into an array of substrings based on a specified delimiter.
🌐
W3Schools
w3schools.com › java › java_howto_string_to_array.asp
Java How To Convert a String to an Array
Explanation: The loop goes through each element in the array and prints it. So for "Hello", it prints the letters one by one: H, e, l, l, o. ... Coding fundamentals as bite-sized lessons and challenges. ... If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: sales@w3schools.com · If you want to report an error, or if you want to make a suggestion, send us an e-mail: help@w3schools.com · HTML Tutorial CSS Tutorial JavaScript Tutorial How To Tutorial SQL Tutorial Python Tutorial W3.CSS Tutorial Bootstrap Tutorial PHP Tutorial Java Tutorial C++ Tutorial jQuery Tutorial
🌐
iO Flood
ioflood.com › blog › java-string-array
How to Create and Manipulate Java String Arrays
February 27, 2024 - In this code, we’ve created a two-dimensional string array multiStrArray and accessed elements from both dimensions. Java provides built-in methods to sort string arrays.