Java HttpCookie getDomain() MethodThe getDomain() method of HttpCookie class is invoked to return the domain name set for the given cookie. The general form of the domain is set by RFC 2965. SyntaxParameterN.A. ReturnThe above method is used to return a string which contains the domain name. Example 1Test it NowOutput: The domain name is given as: www.google.com Example 2Test it NowOutput: The first domain name is given as: www.google.com The second domain name is given as: www.javatpoint.com Example 3Test it NowOutput: The domain name is given as: null Next TopicgetMaxAge() 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