Javatpoint Logo
Javatpoint Logo

Java HttpCookie getValue() Method

The getValue()method of Java HttpCookie class is used to return the current value of the cookie.

Syntax

Parameter

N.A.

Return

The above method is used to return a String which contains the present value of the cookie.

Example 1

Test it Now

Output:

The present value of the cookie is given as: 56

Example 2

Test it Now

Output:

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

Example 3

Test it Now

Output:

The present value of the cookie is given as: 21
Next TopicJava HttpCookie





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA