Here you can find the source of multiplyString(String s, int count)
public static String multiplyString(String s, int count)
//package com.java2s; /*//www .j av a 2s . c om Copyright (C) 2013 Tobias B odify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. jsync is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with jsync. If not, see <http://www.gnu.org/licenses/>. */ public class Main { public static String multiplyString(String s, int count) { final StringBuilder ret = new StringBuilder(); for (int i = 0; i < count; i++) { ret.append(s); } return ret.toString(); } }