/******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run and Debug online from anywhere in world.
*******************************************************************************/
import java.util.*;
public class Main
{
public static void main(String[] args) {
List<String> paramList = new ArrayList<String>();
paramList.add("param1");
paramList.add("param2");
String withoutLastComma = String.join(", ", paramList);
System.out.println(withoutLastComma);
List<String> paramList2 = new ArrayList<>();
paramList2.add("param1");
paramList2.add("param2");
String withoutLastComma2 = String.join(", ", paramList2);
System.out.println(withoutLastComma2);
}
}