c++ auto equivalent in java code example Example: auto in java for ( Object var : object_array) System.out.println(var);