Guava’s Joiner class provides various methods to handle joining operations on string, objects, etc. This class provides advanced functionality for the join operation.
Declaration: Following is the declaration for com.google.common.base.Joiner class :
@GwtCompatible public class Joiner extends Object
The following table gives a brief summary of the methods provided by Guava’s Joiner class:
Original Array: [one, two, three, four] Joined String: one...two...three...four
Some more methods provided by Guava’s Joiner class are:
Original Array: [one, two, null, four, null, five] Joined String: one+two+four+five
Reference: Google Guava Joiner Class
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready.