Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.util.Log;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

public class Main {
    private static String getJsonResult(String json) throws JSONException {
        JSONObject object = new JSONObject(json);
        JSONArray JSONArray_translation = object.getJSONArray("translation");
        String str_translation = JSONArray_translation.getString(0);
        Log.e("str_translation", str_translation);
        return str_translation;
    }
}