|
小弟我在学Java的时候遇到了困难请大虾们帮忙,代码如下:
1 <html>
2 <head>
3 <title>stringTokenizer操作</title>
4 </head>
5 <body>
6 <%@ page language="java"%>
7 <%@ page import="java.util.*"%>
8 <%
9 String s1="one two three four five";
10 StringTokenizer token=new StringTokenizer(s1);
11 int token_count=token.countTokens();
12 String comment="token的个数为";
13 byte[] byte1=comment.getBytes();
14 out.print((new String(byte1,"8859_1"))+token_count+"<br>");
15 while(token.hasMoreTokens()){
16 out.print(token.nextToken());
17 out.print("<br>");
18 }
19 %>
20 </body>
21 </html>
请帮我解释10-17行的意思,谢谢。也就是StringTokenizer的用法及其含意 |
|