Java HttpCookie setComment() MethodThe setComment(String purpose) method of HttpCookie class is used to specify a comment which describes the purpose of the cookie. Comments are not supported by Netscape version 0 cookies. SyntaxParameterThe above method requires only one parameter:
ReturnNA Example 1Test it NowOutput: Comment : Java is a programming language. Example 2Test it NowOutput: Comment : setComment() specifies a comment which describes the purpose of the cookie. Example 3Test it NowOutput: Comment1 : This is the first cookie. Comment2 : This is the second cookie.
Next TopicsetCommentURL() Method
|