Example – How to search Google using Java

google_search_img
Following is the sample code for searching the Google and getting some top results.

This example uses jsoup for sending request and parsing the html response.

Dependency

Jsoup dependency can be downloaded from here : http://jsoup.org/download

Example – search Google with the query “java tutorials”

OUTPUT

www.tutorialspoint.com/java/
www.javatpoint.com/java-tutorial
docs.oracle.com/javase/tutorial/
javabeginnerstutorial.com/core-java/
www.udemy.com/java-tutorial/
tutorials.jenkov.com/java/
www.youtube.com/watch%3Fv%3Dr59xYe3Vyks
www.youtube.com/watch%3Fv%3DCfd9DOnuF9w
beginnersbook.com/java-tutorial-for-beginners-with-examples/
www.freejavaguide.com/corejava.htm
www.java2s.com/Tutorial/Java/CatalogJava.htm
www.vogella.com/tutorials/java.html
www.lynda.com/Java-training-tutorials/1077-0.html
courses.coreservlets.com/Course-Materials/java.html
www.learnjavaonline.org/

 

 

Submit a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

www.000webhost.com