My input is coming from a socket
using DataInputSteam
and because I can have several different String values all being assigned to same clientDay
Thanks Prasaanth, that's what I was doing wrong.
I needed my ArrayList<String> ar = new ArrayList<String>();
to be global and simplified the rest as follows inside my method.
dataInputStream = new DataInputStream(
socket.getInputStream());
ar.add(dataInputStream.readUTF());
System.out.print("ar: "+ar);