Javatpoint Logo
Javatpoint Logo

Java HttpCookie getPortlist() Method

The getPortlist() method of HttpCookie class is invoked to return the port list attribute of the cookie.

Syntax

Parameter

N.A.

Return

The above method is used to return a String which contains the port list. Also, the method may return null if there is no port list.

Example 1

Test it Now

Output:

The port lists is given as: 2100, 1897

Example 2

Test it Now

Output:

The first port list is given as:3980
The second port list is given as:3900

Example 3

Test it Now

Output:

The port lists is given as: null
Next TopicgetSecure() Method





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA