Java URL getPort() MethodThe getPort() method of URL class returns the port number of the Specified URL. SyntaxReturnsThe port number, or -1 if the port is not set Example 1Test it NowOutput: Url: http://127.0.0.1:8080/apex/f?p=4500:1001:2075345827901807::NO:: Port in given url is : 8080 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