Loading
ArrayList To Comma DelimtedString

Java Quick Notes

Refresh Your Java - Before Java Interview

We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....


Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet

Go to SiteMap

Q)  ArrayList To Comma DelimtedString


Ans)

This Util Class holds a method that Covert a ArrayList
to Comma Separated Srting.

public ListToDelimtedString {
 /**
  * This method Converts a List to Comma separated
  * String
  *
  */
 private String listToDelimtedString(List toList, String messageType) {
     StringBuffer sbuf = new StringBuffer();
     Iterator iterator = null;
       iterator = toList.iterator();
       while(iterator.hasNext()){
      String address = ((String)iterator.next())
         sbuf.append(address);
         if(iterator.hasNext()){
          sbuf.append(NotificationConstant.ADDRESS_DELIMITOR);
         }
       }
     return sbuf.toString();
   }
}



Back to top

------------------------- We hope you got necessary Info On -----------------------------------------

ArrayList To Comma DelimtedString


ArrayList To Comma DelimtedString

-------------------------------------------------------------------------------------------------------



Face Book
Request for a Mock Interview/Training

Get a PDF

Face Book
Same look (Read) on any device, this is Ads free