Here you can find the source of createStringFromIntArray( List
public static String createStringFromIntArray( List<Integer> listOfNumbers)
//package com.java2s; /******************************************************************************* * Copyright (c) 2017 JCrypTool Team and Contributors * /*from w w w .j a v a 2 s .c o m*/ * All rights reserved. This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ import java.util.List; public class Main { public static String createStringFromIntArray( List<Integer> listOfNumbers) { String ret = ("["); if (listOfNumbers != null) { for (int i = 0; i < listOfNumbers.size(); i++) { if (i != listOfNumbers.size() - 1) { ret += (listOfNumbers.get(i)); ret += ", "; } else { ret += listOfNumbers.get(i); } } ret += "]"; } return ret; } }