```
String[] m_cPackageName;

int m_size;

int j=0;

List<ApplicationInfo> installedList = packageManager.getInstalledApplications(PackageManager.GET_META_DATA);
m_size = installedList.size();

m_cPackageName=new String[m_size];

for (PackageInfo pi : pkginfoList) {

    try {
        m_appinfo = packageManager.getApplicationInfo(pi.packageName, 0);
        if ((m_appinfo.flags & ApplicationInfo.FLAG_SYSTEM) == 0) {
        // equal to zoo means system apps, not equal is third party installed apps 
        m_cPackageName[j]=pi.packageName;

        j++;
        }
    } catch (NameNotFoundException e) {
        Log.d(getClass().getSimpleName(), "Name not found", e);
}

```

Here I'm getting total size of installedList is 56..After filling the value in array it display in null values. how can i eliminate the null values.. Any one Help for me..

**OUTPUT :**

```
m_cPackageName=String[56];

m_cPackageName[0]="Myvalue"

m_cPackageName[1]="null"

m_cPackageName[2]="null"
.

.

.

m_cPackageName[55]="null"

```