Here you can find the source of combineArray(String[] array, int offset)
Parameter | Description |
---|---|
array | The array to combine |
offset | The starting offset in the array to start combining at. |
public static String combineArray(String[] array, int offset)
//package com.java2s; /*// w w w. jav a 2s. c om * Copyright 2015 RITcraft & Chris Bitler * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ public class Main { /** * Combines the parts of a string array into a statement seperated by spaces * @param array The array to combine * @param offset The starting offset in the array to start combining at. * @return */ public static String combineArray(String[] array, int offset) { String combination = ""; for (int i = offset; i < array.length; i++) { combination += (array[i] + " "); } return combination; } }