Java HttpCookie getValue() 方法

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

Java HttpCookie 类的 getValue() 方法用于返回 cookie 的当前值。

语法

参数

不适用。

返回

上面的方法用于返回一个 String,其中包含 cookie 的当前值。

示例 1

输出

The present value of the cookie is given as: 56

示例 2

输出

The present value of the first cookie is given as: 56
The present value of the second cookie is given as: 78

示例 3

输出

The present value of the cookie is given as: 21
下一主题Java HttpCookie