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 |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India