Java tutorial
//package com.java2s; import android.app.Activity; import android.util.Log; public class Main { public static String getResourceString(String paramString, Activity paramActivity) { Class localClass = null; if (0 == 0) ; try { localClass = Class.forName(paramActivity.getPackageName() + ".R$string"); String str = paramActivity.getResources() .getString(((Integer) localClass.getDeclaredField(paramString).get(null)).intValue()); return str; } catch (Exception localException) { Log.e(paramActivity.getPackageName(), localException.getMessage(), localException); paramActivity.finish(); } return ""; } }