Online Java Compiler By
JavaTpoint.com
import java.net.HttpCookie; public class JavaHttpCookieGetValueExample3 { public static void main(String[] args) { HttpCookie cookie = new HttpCookie("Employee", "21"); // Returns the present value of the cookie. System.out.println("The present value of the cookie is given as: "+cookie.getValue()); } }
Output