I have a scenario wherein I have a Bean class from where I'm getting all the Client names and other Client related details. I'm creating a Bean object and getting all the details.
ArrayList<ClientBean> clientList = (ArrayList<ClientBean>) (new QueriesDAO())
.getAllClient();
From the above code I am getting all the details of the Client. And to get only the Client names I'm through the index form,
ClientBean clist = clientList.get(2);
for (ClientBean clientBean : clientList) {
clientBean.getclientName(); // here I'm getting only the Client names one by one.
}
My Question is How do I add only the Client names in an ArrayList dynamically?