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