Java URL getProtocol() 方法

2025年3月24日 | 1 分钟阅读

URL 类的 getProtocol() 方法返回此 URL 的协议名称。

语法

返回值

此 URL 的协议。

示例 1

输出

Url: https://tpointtech.cn/URL-class
Protocol used in given url is : https

示例 2

输出

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
下一个主题Java URL 类