Java String array examples (with Java 5 for loop syntax)
[toc]
Java String array FAQ: Can you share some Java array examples, specifically some String
array examples, as well as the new for loop syntax that was introduced back in Java 5?
Sure. In this tutorial, I’ll show how to declare, populate, and iterate through Java string arrays, including the newer for-loop syntax. Because creating a String
array is just like creating and using any other Java object array, these examples also work as more generic object array examples.