Java URL getUserInfo() 方法

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

URL 类的 getUserInfo() 方法以字符串的形式返回此 URL 的 userInfo 部分。如果用户信息不可用,则返回 null。

语法

返回值

此 URL 的 userInfo 部分,如果不存在则返回 null

自从 (Since)

1.3

示例 1

输出

user information is :null
https://mail.google.com/mail/u/0/?tab=wm#inbox

示例 2

输出

The given url is : https://tpointtech.cn/java-threadpoolexecutor
User information of given url is : null
下一个主题Java URL 类