Here you can find the source of getString(Context context, int resourceId)
public static String getString(Context context, int resourceId)
//package com.java2s; import android.content.Context; public class Main { public static String getString(Context context, int resourceId) { if (context != null) { return context.getResources().getString(resourceId); }// w w w .ja v a 2s . c om return null; } }