Advertisement
kraxor

Java URL

Feb 1st, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.30 KB | None | 0 0
  1. import java.net.*;
  2.  
  3. public class UrlDemo {
  4.  
  5.      public static void main(String []args) throws MalformedURLException {
  6.         URL url = new URL("https://most.jon.a.java.com:666/foo?jalo=pee&shit=piss");
  7.         if (url.getHost().equals("most.jon.a.java.com")) System.out.println("you see?");
  8.      }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement