Java URL getProtocol() MethodThe getProtocol() Method of URL class returns the protocol name of this URL. SyntaxReturnsThe protocol of this URL. Example 1Test it NowOutput: Url: https://www.javatpoint.com/URL-class Protocol used in given url is : https Example 2Output: Given URL is : http://127.0.0.1:8080/apex/wwv_flow_help.show_get_started Protocal : http File name : /apex/wwv_flow_help.show_get_started
Next TopicJava URL Class
|