Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.ArrayList;

import android.util.Log;

public class Main {
    public static String USER_NAME = "";

    public static String[] removeLocalUserNameFromArray(String[] user) {
        ArrayList<String> userList = new ArrayList<String>();
        for (int i = 0; i < user.length; i++) {
            Log.d("i=" + i, user[i]);
            if (USER_NAME.equals(user[i]) == false) {
                userList.add(user[i]);
            }
        }
        String returnArray[] = new String[userList.size()];
        for (int i = 0; i < returnArray.length; i++) {
            returnArray[i] = userList.get(i).toString();
        }
        return returnArray;
    }
}