Hi.
I am creating a java applet, but I dont think I am importing the correct classes:
import java.applet.*; import java.io.*; import java.net.*; import java.awt.event.*; import java.util.regex.Pattern; import java.util.regex.Matcher; import java.util.*; import java.util.ListIterator; import java.util.List; Map<String, List<String>> headers = connection.getHeaderFields(); List<String> values = headers.get("Set-Cookie"); String cookieValue = null; for (Iterator iter = values.iterator(); iter.hasNext(); ) { String v = values.next(); if (cookieValue == null) cookieValue = v; else cookieValue = cookieValue + ";" + v; }
error:
httpc.java:180: cannot find symbol
symbol : method next()
location: interface java.util.List<java.lang.String>
String v = values.next();
Which class am I missing? thanks.