Java - Transform string list into list

Problem:

Transform a list of strings into a single string. One solution is to iterate over the list and append its contents. Remember that StringBuilder's append is much faster than Strings concatenation.

Solution:

A better solution is relying on Java StringJoiner


, or with Java 8



Comments

Popular posts from this blog

Hibernate - HibernateException: createQuery is not valid without active transaction