I know I'm probably being incredibly stupid here, but can anybody shed any light on my problem? I'm trying to extract the title from a string containing html...
public static void main(String args[]) {
System.out.println(getTitle("<title>this is it</title>"));
}
public static String getTitle(String a) {
StringTokenizer token = new StringTokenizer(a, "<title>", false);
return token.nextToken("</title>");
}
Keeps returning "h" and I can't work out why! Am is being naive?
Cheers