Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.content.Context;

public class Main {

    public static String parseString(Context context, Object obj) {
        if (obj != null) {
            if (obj instanceof String) {
                return obj.toString();
            } else if (obj instanceof Integer) {
                return context.getString((Integer) obj);
            }
        }
        return null;
    }
}