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
|