Last active
October 11, 2017 05:53
-
-
Save Terryhung/f73b915b3a53699626bd19d45cc42164 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Java | |
public static String ParsingHost() throws Exception { | |
String url = "http://www.cna.com.tw/news/aloc/201710030325-1.aspx"; | |
URL aURL = new URL(url); | |
String host = aURL.getHost(); | |
return host; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment