Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    /**
     * Combines strings into a string using {@link StringBuilder}. The default
     * capacity of the StringBuilder is 100. <br>
     * <br>
     * Use this method when make shell script, test case list and etc..
     * 
     * @param strings
     *            the strings to be combined into one
     * @return the combined string
     */
    public static String combineStrings(String... strings) {
        StringBuilder stringBuilder = new StringBuilder(100);
        for (String string : strings) {
            stringBuilder.append(string);
        }
        return stringBuilder.toString();
    }
}