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 java.util.ArrayList;

public class Main {
    public static String arrayParamToString(ArrayList<String> strings) {

        String arrayToStringParam = "";

        if (strings != null && !strings.isEmpty()) {

            for (int i = 0; i < strings.size(); i++) {

                String param = strings.get(i);

                if (i == 0)
                    arrayToStringParam += param;
                else
                    arrayToStringParam += "," + param;

            }
        }

        return arrayToStringParam;
    }
}