Is there an auto variable type in Java like you have in C++?
auto
An example:
for ( auto var : object_array) std::cout << var <<
In short, no, there is no auto type. If all you are doing is printing the value though, you could just refer to the value as an Object.
Object