Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Java.util.StringJoiner in Java8
This class is used Join a sequence of characters separating using the delimiter.
Example
public class StringJoinerSample {
public static void main(String[] args){
StringJoiner sj = new StringJoiner(", ");
sj.add("Krishna");
sj.add("Raju");
sj.add("Satish");
sj.add("Pruthvi");
System.out.println(sj);
}
}
Output
Krishna, Raju, Satish, Pruthvi
Advertisements