Java HttpCookie getCommentURL() 方法

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

Java HttpCookie 类的 getCommentURL() 方法用于返回描述 cookie 用途的注释 URL。如果 cookie 没有注释 URL,则该方法可能返回 null。

语法

参数

不适用。

返回

上述方法用于返回一个包含注释 URL 的字符串。如果不存在注释 URL,则该方法可能返回 null。

示例 1

输出

The comment URL is given as: 193.18.4.1

示例 2

输出

The first comment URL is given as: 193.18.4.1
The second comment URL is given as: 155.43.21.5

示例 3

输出

The comment URL is given as: null 
下一个主题getDiscard() 方法