Online Java Compiler By
JavaTpoint.com
import java.net.HttpCookie; public class JavaHttpCookieGetPortlistExample3 { public static void main(String[] args) { HttpCookie cookie = new HttpCookie("Employee", "21"); // Return null if there is no port list. System.out.println("The port lists is given as: "+cookie.getPortlist()); } }
Output