Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import android.support.annotation.NonNull;

public class Main {
    public static String toString(@NonNull Object[] elements, @NonNull String delimiter) {
        final StringBuilder builder = new StringBuilder();
        boolean nonFirst = false;
        for (Object o : elements) {
            if (nonFirst) {
                builder.append(delimiter);
            } else {
                nonFirst = true;
            }
            builder.append(o.toString());
        }
        return builder.toString();
    }
}