Java HttpCookie getDiscard() MethodThe 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 1Test it NowOutput: Checks the discard attribute of the cookie : false Example 2Test it NowOutput: Checks the discard attribute of the cookie: true
Next TopicgetDomain() Method
|