Java HttpCookie getDiscard() Method22 Mar 2025 | 1 min read The getDiscard() method of HttpCookie class is used to return the discard attribute of the cookie. SyntaxParameterN.A. ReturnThe above method is used to return a Boolean which represents the cookie?s discard attribute. Example 1Output: Checks the discard attribute of the cookie : false Example 2Output: Checks the discard attribute of the cookie: true Next TopicgetDomain() Method |
We request you to subscribe our newsletter for upcoming updates.

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