HttpCookie GetPortlist() Example

Return the port list attribute of the cookie


HttpCookieclass GetPortlist() method example. This example shows you how to use GetPortlist() method.This method Return the port list attribute of the cookie

Here is the code:-
/* 
 * @Program that Return the port list attribute of the cookie
 * GetPortlist.java 
 * Author:-RoseIndia Team
 * Date:-25-Jun-2008
 */

import java.net.*;

public class GetPortlist {
public static void main(String[] argsthrows Exception {
        String name = "Roseindia";
        String value = "ABC";
        HttpCookie hc = new HttpCookie(name, value);
        hc.setPortlist("8080");
        //Return the port list attribute of the cookie
        System.out.println("Port list is: "+hc.getPortlist());
    }

}

Output of the program:-
 Port list is: 8080

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

HOME | COPYRIGHT | CONTACT US