aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorprithugoswami <prithugoswami524@gmail.com>2019-03-29 19:39:16 +0530
committerprithugoswami <prithugoswami524@gmail.com>2019-03-29 19:39:16 +0530
commita7a3174fdfdf6e9ae41158375a2844a05a6207c7 (patch)
tree652725b2b3ada9eed4bbadbe0b85bae02b8035f1
parentfbd9628246c644fe4ba803145431986dbf3b5ffb (diff)
downloadtmdb-desktop-client-a7a3174fdfdf6e9ae41158375a2844a05a6207c7.tar.gz
tmdb-desktop-client-a7a3174fdfdf6e9ae41158375a2844a05a6207c7.zip
update test.java
-rw-r--r--test.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/test.java b/test.java
index ef883b0..60bf4b2 100644
--- a/test.java
+++ b/test.java
@@ -11,7 +11,11 @@ import org.json.*;
class test{
public static void main(String args[]){
try{
- URL url = new URL("https://googledictionaryapi.eu-gb.mybluemix.net/?define=farrago&lang=en");
+ String word = "farrago";
+ String req_url = (
+ "https://googledictionaryapi.eu-gb.mybluemix.net/?define=%s&lang=en"
+ );
+ URL url = new URL(String.format(req_url, word));
InputStream res = (InputStream)url.getContent();
JSONArray ja = new JSONArray(new JSONTokener(res));
System.out.println(ja.toString(4));