Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.StringJoiner;

public class Main {
    public static void main(String[] argv) {
        StringJoiner sj = new StringJoiner(":", "[", "]");
        sj.add("George").add("Sally").add("Fred");
        String desiredString = sj.toString();

        System.out.println(desiredString);
    }
}