Java ‘array of objects’ syntax examples
Java array FAQ: Can you share some examples of how to create arrays in Java (Java object arrays)?
While I generally work with lists and maps in Java, I occasionally need to create object arrays in Java. Since I don't use arrays that often, I thought I'd share some examples here so I can have a handy Java array syntax reference.
A simple Java String array
I work with the String class a lot, and here's how to create a String array in Java: