Java URL getAuthority() methodThe getAuthority() method of the URL class is used to get the authority part of given URL. SyntaxReturnsThe authority part of this URL Since1.3 Example 1Output: Enter Url http://localhost:8080/notic/note.jsp Authority part of the url : localhost:8080 Example 2Test it NowOutput: Url Authority : www.javatpoint.com The mime type is : text/html; charset=iso-8859-1 Next TopicJava URL Class |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India