public void two(final BeanForm[] captureddata)
{
for (BeanForm form : captureddata)
{
if (form.getCyclicType() != null)
{
logger.info("The Cyclic Type is"+ form.getCyclicType().value());
}
if (form.getTicketType() != null)
{
logger.info("The Ticket Type is"+ form.getTicketType().value());
}
}
}
The above code works fine, but the output what I can see in the log file is (In case the length of the BeanForm is 2 )
11/Nov/2011 20:15:51 - The Cyclic Type is DTI
11/Nov/2011 20:15:51 - The Ticket Type is MMTS
11/Nov/2011 20:15:51 - The Cyclic Type is DTI
11/Nov/2011 20:15:51 - The Ticket Type is MMTS
I just wanted to know whether it is possible to get the array details also, like to which array this data belongs to
For example
The array[1] Cyclic Type is DTI
The array[2] Cyclic Type is SAG
Just use an external count:
or as a normal for loop