Need help dubugging Java code
Hi. I have been working on some code to check whether a word is part of dictionary.com's dictionary via a URL check. Not sure why I am getting an error at this point. Any help would be appreciated. Code is below: import java.io.*; import java.net.*; public class Program { public static void main(String[] args) { String url = "http:////dictionary.com//browse//"; String word = "plop"; try{URL dicti = new URL(url + word); } catch(MalformedURLException e) { System.out.println("error"); } BufferedReader br = new BufferedReader(new InputStreamReader(dicti.openStream())); String line = br.readLine(); while (line != null) { System.out.println(line); } } }