Java Authenticator getRequestingPort() MethodThe getRequestingPort() method of Authenticator class is used to get the port number for the requested connection. Syntax:Parameter:No parameter is passed. Return:An integer indicating the port for the requested connection. Throw:Does not throw an Exception Example 1Test it NowOutput: Host using url.getHost ::www.javaTpoint.com Port Requesting :8080 //source code of https://www.javatpoint.com is printed Example 2Test it NowOutput: Portname:8080 //source code of https://www.javatpoint.com is printed. Next TopicgetRequestingPrompt() Method |
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