### Question:
Util { public static String extractJsonVariableNameFromString(final String s) { if (s == null) { return EmptyString; } JsonParser jp = new JsonParser(); JsonElement je; JsonObject jo; JsonArray ja; try { je = jp.parse(s); if(je.isJsonArray()) { ja = je.getAsJsonArray(); jo = ja.get(0).getAsJsonObject(); } else { jo = je.getAsJsonObject(); } } catch (Exception e) { return "ERROR"; } Set<Map.Entry<String, JsonElement>> entrySet = jo.entrySet(); for (Map.Entry<String, JsonElement> entry : entrySet) { return entry.getKey(); } return je.toString(); } private  Util(); static void printMethods(final Class c); static String extractJsonVariableNameFromString(final String s); static String extractJsonVariableValueFromString(final String s); static String extractBytePacketValueFromString(final String packetName, final String s); static void extractGlobalVariable(final String s); static String applyVariable(HashMap<String, String> variableSet, final String s); static Class loadClassFromJarFile(final String pathToJar, final String apiClassName);  }### Answer:
@Test public void test3() throws Exception { String s = "{\"[com.nhnent.msg.protocol]LoginResult\":{\"retCode\":\"CREATE\"}}"; String returned = Util.extractJsonVariableNameFromString(s); System.out.println(returned); }