Java HttpCookie getSecure() MethodThe getSecure() method of Java HttpCookie class is used to return true if sending the cookie through a secure protocol is restricted. Otherwise, the method may return true so that it can be sent using any protocol. SyntaxParameterN.A. ReturnThe above method is used to return false if the cookie can be sent by any other standard protocol. Otherwise, the method may return true. Example 1Test it NowOutput: Tests whether the cookie can be sent through secured protocol or not: false Example 2Test it NowOutput: Tests whether the cookie can be sent through secured protocol or not: true
Next TopicgetValue() Method
|