Convert array To String - Android java.lang

Android examples for java.lang:array convert

Description

Convert array To String

Demo Code

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main{

    public static String arrayToString(String[] array) {
        if (array == null) {
            return null;
        }//from  ww  w. j a  va  2 s .  co  m
        if (array.length == 0) {
            return null;
        }
        String result = "";
        for (String str : array) {
            result += str;
        }
        return result;
    }

}

Related Tutorials