HttpCookie GetValue() Example

Returns the value of the cookie.


HttpCookieclass GetValue() method example. This example shows you how to use GetValue() method.This method Returns the value of the cookie.

Here is the code:-
/* 
 * @Program that Returns the value of the cookie.
 * GetValue.java 
 * Author:-RoseIndia Team
 * Date:-25-Jun-2008
 */

import java.net.*;

public class GetValue {

    public static void main(String[] argsthrows Exception {
        String name = "Roseindia";
        String value = "ABC";
        HttpCookie hc = new HttpCookie(name, value);
        //Returns the value of the cookie.
         System.out.println("The value of the cookie is:"+hc.getValue());
    }
}

Output of the program:-
 The value of the cookie is:ABC

Post Comment
Name:
E-mail:
Contact no :
Comments:
  Refresh Image
Verify Image:
 
 
Your Comment's
 
 
 

HOME | COPYRIGHT | CONTACT US