Demonstrate String arrays. : Array Objects « Collections « Java Tutorial
- Java Tutorial
- Collections
- Array Objects
class StringDemo3 {
public static void main(String args[]) {
String str[] = { "one", "two", "three" };
for (int i = 0; i < str.length; i++)
System.out.println("str[" + i + "]: " + str[i]);
}
}