Advertisement
Guest User

Untitled

a guest
Jun 8th, 2016
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. public class SimpleMath {
  2. public void getUrl(String a) throws IOException{
  3. URL b = new URL(a);
  4. BufferedReader in = new BufferedReader(new InputStreamReader(b.openStream()));
  5. String inputLine;
  6. while((inputLine=in.readLine())!=null)
  7. System.out.println(inputLine);
  8. String s = inputLine;
  9. in.close();
  10. if(s.contains("div")){
  11. System.out.println("BEGIN");
  12. }
  13. }
  14.  
  15.  
  16. public static void main(String[] args) throws IOException {
  17. SimpleMath sm = new SimpleMath();
  18. sm.getUrl("http://oracle.com");
  19. }
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement