Java HttpCookie setCommentURL() Method

The setCommentURL(String purpose) method of HttpCookie class is used to specify a comment URL which describes the purpose of the cookie. Comment URL is RFC 2965 only.

Syntax

Parameter

The above method requires only one method :

  1. purpose - which denotes a String which further specifies the comment URL which is directly visible to the user.

Return

NA

Example 1

Test it Now

Output:

The comment URL is given as : 123.45.33.21

Example 2

Test it Now

Output:

The first comment URL is given as : 345.187.90.
The second comment URL is given as : 452.121.29.7
Next TopicJava HttpCookie




Latest Courses