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

String[][] array = {emptyArr, filledArr, moreFilledArr};
String[][] 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 - ... // Java program to demonstrate various // methods to iterate over a string array public class GFG { public static void main(String[] args) { String[] arr = { "Apple", "Banana", "Orange" }; // First method for (String i : arr) { ...
๐ŸŒ
W3Schools
w3schools.com โ€บ java โ€บ java_arrays.asp
Java Arrays
Java Examples Java Videos Java Compiler Java Exercises Java Quiz Java Code Challenges Java Practice Problems Java Server Java Syllabus Java Study Plan Java Interview Q&A ... Arrays are used to store multiple values in a single variable, instead of declaring separate variables for each value. To declare an array, define the variable type with square brackets [ ] : ... We have now declared a variable that holds an array of strings.
Discussions

How to create and initialise in Java an array of String arrays in one line? - Stack Overflow
please do check these too Docs ... with java docs , I had to add this as a comment but I couldn't, I want to extend with more resources mentioned above , Thanks ... We can also achieve it by initialising and assigning to a single dimensional array of type Object. Something like below. String[] filledArr ... More on stackoverflow.com
๐ŸŒ stackoverflow.com
Java - How do I make a String array with values? - Stack Overflow
I know how to make an empty array, but how do I make a String array with values from the start? More on stackoverflow.com
๐ŸŒ stackoverflow.com
In Java, how do static arrays of Strings work? Strings are arrays of characters, so when the array of Strings is initialized with a given size, how does Java know how much memory to allocate?
It's really just an array of references (this means 32 or 64 bit addresses depending on the platform), no memory is allocated for the string objects. More on reddit.com
๐ŸŒ r/learnprogramming
9
1
December 16, 2022
So why aren't strings considered arrays?
Strings are character arrays in most languages... More on reddit.com
๐ŸŒ r/learnprogramming
22
4
November 30, 2020
๐ŸŒ
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.
๐ŸŒ
CodeGym
codegym.cc โ€บ java blog โ€บ java arrays โ€บ string array in java
String Array in Java
May 11, 2023 - To search for a needed String in a String array in Java, you can use a loop for iterating through each array element and compare it to the String you're searching for. Here's an example program:
๐ŸŒ
Alvin Alexander
alvinalexander.com โ€บ java โ€บ java-string-array-reference-java-5-for-loop-syntax
Java String array examples (with Java 5 for loop syntax) | alvinalexander.com
Hereโ€™s a complete source code example that demonstrates the syntax prior to Java 5: public class JavaStringArrayTests1 { private String[] toppings = {"Cheese", "Pepperoni", "Black Olives"}; // our constructor; print out the String array here public JavaStringArrayTests1() { // old `for` loop ...
๐ŸŒ
Edureka
edureka.co โ€บ blog โ€บ string-array-in-java
Java String Array | String Array in Java with Examples | Edureka
July 5, 2024 - String Array is used to store a fixed number of Strings. This Java String Array tutorial will help you learn string arrays along with working examples.
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 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.
๐ŸŒ
Java Code Geeks
examples.javacodegeeks.com โ€บ home โ€บ java development โ€บ java basics โ€บ arrays
Java String Array Example
November 9, 2023 - Finally, letโ€™s see the ... args[]) { String[][] schoolbagArray = new String[4][2]; schoolbagArray[0] = new String[] {"Pens", "Pencils"}; schoolbagArray[1] = new String[] {"Books", "Notebooks"}; System.out.println( ...
๐ŸŒ
Centron
centron.de โ€บ home โ€บ tutorials โ€บ java string array - tutorial
Java String Array - Tutorial โ€“ centron
March 1, 2024 - String array is very common in simple Java programs, especially among beginners to Java and to test some specific scenarios. Even the Java main method argument is a string array - public static void main(String[] args). So today, we will look into different aspects of the Java string array with example programs.
๐ŸŒ
Unstop
unstop.com โ€บ home โ€บ blog โ€บ string array in java | create, operations & more (+examples)
String Array In Java | Create, Operations & More (+Examples)
January 15, 2025 - This allows for efficient access and manipulation of elements, especially when you know the number of strings beforehand. Example: If you have a string array of days, you can directly access days[2] to get "Wednesday".
๐ŸŒ
Hero Vired
herovired.com โ€บ learning-hub โ€บ blogs โ€บ string-array-in-java
String Array in Java: How to Declare, Example, Initializing
October 7, 2024 - In Java, an array's index starts at 0, so to access the first element of an array, we would use myArray\$\$$0$, and for the second myArray\$\$$1$, etc. For example: "`Java String myElement = myArray$1$; // Retrieves "two" from the array ```
๐ŸŒ
Upgrad
upgrad.com โ€บ home โ€บ tutorials โ€บ software & tech โ€บ string arrays in java
String Array in Java โ€“ How to Declare, Initialize, Iterate, and Use
May 14, 2025 - Explanation: In this example, we loop through the fruits array and append each element to the StringBuilder with a space as a delimiter. The if condition ensures that no extra space is added after the last element.
๐ŸŒ
iO Flood
ioflood.com โ€บ blog โ€บ java-string-array
How to Create and Manipulate Java String Arrays
February 27, 2024 - Java allows the creation of multidimensional arrays. In the context of string arrays, these can be thought of as a library with multiple bookshelves, each containing different books. Hereโ€™s an example of a two-dimensional string array:
๐ŸŒ
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 - The following example demonstrates this concept: String countries [] = {"USA", "UK","CHINA","FRANCE","RUSSIA"}; In the above code snippet, the string type values are directly added into the countries array without even using the new keyword ...
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ string-arrays-in-java
String Arrays in Java
May 5, 2023 - As discussed earlier, we can see that ?st1_arr? is initialized with ?null? value. All the indexes of this string array contains ?null? only. We can access all the elements by iterating through the given array using iterative approaches like for, for each and while loop.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ java โ€บ java-program-to-convert-string-to-string-array
Java Program to Convert String to String Array - GeeksforGeeks
July 23, 2025 - ... // Java Program to Convert ... string to be convert to string array String str = "Geeks for Geeks"; String strArray[] = str.split(" "); System.out.println("String : " + str); System.out.println("String array : [ "); // ...
๐ŸŒ
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 - Once the string array is declared in Java, you can initialize it with some other values. This is because the default values of the array that are assigned to the string elements are null. Hence, soon after the declaration, you can proceed to initialize a string array.
๐ŸŒ
javaspring
javaspring.net โ€บ blog โ€บ declaring-string-array-in-java
Declaring String Arrays in Java: A Comprehensive Guide โ€” javaspring.net
A string array in Java is a collection of String objects. Each element in the array is a String, which is an object representing a sequence of characters. Arrays in Java are fixed-size, meaning that once you create an array, its size cannot be changed.