Java HttpCookie getCommentURL() Method

The getCommentURL() method of Java HttpCookie class is used to return the comment URL which describes the purpose of the cookie. Also, the method may return null if the cookie has no comment URL.

Syntax

Parameter

N.A.

Return

The above method is used to return a string containing the comment URL. Also, the method may return null if there is no comment URL.

Example 1

Test it Now

Output:

The comment URL is given as: 193.18.4.1

Example 2

Test it Now

Output:

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

Example 3

Test it Now

Output:

The comment URL is given as: null 




Latest Courses