Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.ArrayList;

public class Main {
    public static String[] removeFromStringArray(String[] a_aArray, String a_sString)
    /*     */ {
        /* 456 */String[] aReturnArray = a_aArray;
        /*     */int iCount;
        /* 457 */if (a_aArray != null)
        /*     */ {
            /* 459 */ArrayList<String> alStrings = new ArrayList();
            /* 460 */for (String sTemp : a_aArray)
            /*     */ {
                /* 462 */if (sTemp.equals(a_sString))
                    /*     */continue;
                /* 464 */alStrings.add(sTemp);
                /*     */}
            /*     */
            /* 467 */aReturnArray = new String[alStrings.size()];
            /* 468 */iCount = 0;
            /* 469 */for (String sTemp : alStrings)
            /*     */ {
                /* 471 */aReturnArray[iCount] = sTemp;
                /* 472 */iCount++;
                /*     */}
            /*     */}
        /* 475 */return aReturnArray;
        /*     */}
}