Ask your own question, for FREE!
Computer Science 19 Online
OpenStudy (anonymous):

how I can to open URL in java ?

OpenStudy (anonymous):

http://docs.oracle.com/javase/tutorial/networking/urls/readingURL.html import java.net.*; import java.io.*; public class URLReader { public static void main(String[] args) throws Exception { URL oracle = new URL(" http://www.oracle.com/ "); BufferedReader in = new BufferedReader( new InputStreamReader( oracle.openStream())); String inputLine; while ((inputLine = in.readLine()) != null) System.out.println(inputLine); in.close(); } }

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!