how to print the array of object in for loop in java

if you want to print the array, why using a for loop?
my guess, you want to print the values of the elements (not the actual array itself).

just go through a loop (either a classical one, or an enhanced for loop), and pass the element of the current iteration to System.out.println(...);
if you don't get the output you want, you've probably forgotten to override the toString method

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.