Syntax error on token(s), misplaced construct(s) ***Android error***
<p>I am fairly new to Android development, and am making a program to translate things using the Google translate API. The error is as follows: 'Syntax error on token(s), misplaced construct(s). Thank you. Here is my Java file:</p>

<pre><code>package org.example.translate;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;

import org.json.JSONException;
import org.json.JSONObject;

import android.util.Log;

import java.io.BufferedReader;

public class TranslateTask implements Runnable {
    private static final String TAG = "TranslateTask";
    private final Translate translate;
    private final String original, from, to;

    TranslateTask(Translate translate, String original, String from, String to) {
        this.translate = translate;
        this.original = original;
        this.from = from;
        this.to = to;
    }

    public void run() {
        String trans = doTranslate(original, from, to);
        translate.setTranslated(trans);

        String retrans = doTranslate(trans, from, to);
        translate.setRetranslated(retrans);
    }

    private String doTranslate (String original, String from, String to) {
        String result = translate.getResources().getString(
                    R.string.translation_error);
        HttpURLConnection con = null;
        Log.d(TAG, "dotranslate(" + original + ", " + from + ", " + to + ")");

//*This is where the error occours*// try {
            if (Thread.interrupted())
                throw new InterruptedException();

                // Build RESTful query for Google API
                String q = URLEncoder.encode(original, "utf-8");
                URL url = new URL(
                        "http://ajax.googleapis.com/ajax/services/language/translate" 
                        + "?v=1.0" + "&amp;q=" + q + "&amp;langpair=" + from
                        + "%7C" + to);
            con = (HttpURLConnection) url.openConnection();
            con.setReadTimeout(10000);
            con.setConnectTimeout(15000);
            con.setRequestMethod("GET");
            con.addRequestProperty("referer", 
                "http://www.pragprog.com/titles/eband3/hello-android");
            con.setDoInput(true);

            con.connect();

        if (Thread.interrupted())
            throw new InterruptedException();

            BufferedReader reader = new BufferedReader(
                    new InputStreamReader(con.getInputStream(), "utf-8"));    
            String payload = reader.readLine();
            reader.close();

            JSONObject jsonObject = new JSONObject(payload);
            result = jsonObject.getJSONObject("responseData")
                .getString("translatedText")
                .replace("&amp;#39;", "'")
                .replace("&amp;amp;", "&amp;");

        if (Thread.interrupted())finally
            throw new InterruptedException();

        } catch ("IOException", e) {
            Log.e(TAG, "IOException" e);
        }
        catch ("JSONException", e) {
            Log.e(TAG, "JSONException", e);
        }
        catch (InterruptedEception e) {
            Log.d(TAG, "InterruptedException", e);
            result = translate.getResources().getString(
                    R.string.translation_interrupted);
        }
        finally {
            if (con!= null) {
                con.disconnect();
        }   
    };
};
</code></pre>

<p>}</p>

<p>Please help me! Clear answers are appreciated</p>
