So in C#, I can treat a string[] as an IEnumerable.
Is there a Java equivalent?
I believe the Java equivalent is Iterable. Although String[] doesn't implement it, you can loop over the elements anyway:
String[] strings = new String[]{"this", "that"};
for (String s : strings) {
// do something
}
If you really need something that implements Iterable, you can do this:
String[] strings = new String[]{"this", "that"};
Iterable stringIterable = Arrays.asList(strings);