<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments for Tech Info</title>
	<atom:link href="http://knowledgeair.wordpress.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://knowledgeair.wordpress.com</link>
	<description></description>
	<lastBuildDate>Sat, 28 Mar 2009 08:30:57 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Attribute and Listener by Krishna</title>
		<link>http://knowledgeair.wordpress.com/2008/10/23/attribute-and-listener/#comment-35</link>
		<dc:creator>Krishna</dc:creator>
		<pubDate>Sat, 28 Mar 2009 08:30:57 +0000</pubDate>
		<guid isPermaLink="false">http://knowledgeair.wordpress.com/?p=18#comment-35</guid>
		<description>Hey Raj,
                 Excellent explanation! I read a lot of documents before, but i couldn&#039;t found all the information like this in one place. 

            I appreciate your work. Keep on publishing on other technologies also(like struts, springs..........)
             
Thanks &amp; Regards,
SRK.</description>
		<content:encoded><![CDATA[<p>Hey Raj,<br />
                 Excellent explanation! I read a lot of documents before, but i couldn&#8217;t found all the information like this in one place. </p>
<p>            I appreciate your work. Keep on publishing on other technologies also(like struts, springs&#8230;&#8230;&#8230;.)</p>
<p>Thanks &amp; Regards,<br />
SRK.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Basic Steps in Using JDBC by koosie</title>
		<link>http://knowledgeair.wordpress.com/2008/02/01/basic-steps-in-using-jdbc/#comment-17</link>
		<dc:creator>koosie</dc:creator>
		<pubDate>Thu, 03 Apr 2008 13:45:11 +0000</pubDate>
		<guid isPermaLink="false">http://knowledgeair.wordpress.com/?p=3#comment-17</guid>
		<description>Hi,

Good one.

if you are looking for any ebooks go for
http://javaopensource.net</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Good one.</p>
<p>if you are looking for any ebooks go for<br />
<a href="http://javaopensource.net" rel="nofollow">http://javaopensource.net</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on About by bibomedia.com</title>
		<link>http://knowledgeair.wordpress.com/about/#comment-16</link>
		<dc:creator>bibomedia.com</dc:creator>
		<pubDate>Fri, 07 Mar 2008 14:02:26 +0000</pubDate>
		<guid isPermaLink="false">#comment-16</guid>
		<description>:)</description>
		<content:encoded><![CDATA[<p> <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on StringTokenizer by Raameshwar</title>
		<link>http://knowledgeair.wordpress.com/2008/02/08/stringtokenizer/#comment-15</link>
		<dc:creator>Raameshwar</dc:creator>
		<pubDate>Thu, 21 Feb 2008 07:40:13 +0000</pubDate>
		<guid isPermaLink="false">http://knowledgeair.wordpress.com/2008/02/08/stringtokenizer/#comment-15</guid>
		<description>Hi Jagan,
Send across your code. We will try to help you. Seems like syntax issue.

Regards,
Raameshwar.</description>
		<content:encoded><![CDATA[<p>Hi Jagan,<br />
Send across your code. We will try to help you. Seems like syntax issue.</p>
<p>Regards,<br />
Raameshwar.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on StringTokenizer by jagan</title>
		<link>http://knowledgeair.wordpress.com/2008/02/08/stringtokenizer/#comment-14</link>
		<dc:creator>jagan</dc:creator>
		<pubDate>Wed, 20 Feb 2008 04:25:34 +0000</pubDate>
		<guid isPermaLink="false">http://knowledgeair.wordpress.com/2008/02/08/stringtokenizer/#comment-14</guid>
		<description>i struck up with a problem while establishing JDBC-ODBC connectivity.
i am sending the code as well as the compiler error log. pls help me out. 

following is the compiler messages.:

Generated servlet error:
    [javac] Since fork is true, ignoring compiler setting.
    [javac] Compiling 1 source file
    [javac] Since fork is true, ignoring compiler setting.
    [javac] D:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\jagan_jsp.java:92: variable Db might not have been initialized
    [javac]             DataRequest = Db.createStatement();
    [javac]                           ^
    [javac] D:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\jagan_jsp.java:101: variable Results might not have been initialized
    [javac] 	Records = Results.next();
    [javac]                   ^
    [javac] D:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\jagan_jsp.java:115: variable DataRequest might not have been initialized
    [javac]             DataRequest.close();
    [javac]             ^
    [javac] 3 errors

the following is the script

    
   </description>
		<content:encoded><![CDATA[<p>i struck up with a problem while establishing JDBC-ODBC connectivity.<br />
i am sending the code as well as the compiler error log. pls help me out. </p>
<p>following is the compiler messages.:</p>
<p>Generated servlet error:<br />
    [javac] Since fork is true, ignoring compiler setting.<br />
    [javac] Compiling 1 source file<br />
    [javac] Since fork is true, ignoring compiler setting.<br />
    [javac] D:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\jagan_jsp.java:92: variable Db might not have been initialized<br />
    [javac]             DataRequest = Db.createStatement();<br />
    [javac]                           ^<br />
    [javac] D:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\jagan_jsp.java:101: variable Results might not have been initialized<br />
    [javac] 	Records = Results.next();<br />
    [javac]                   ^<br />
    [javac] D:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\jagan_jsp.java:115: variable DataRequest might not have been initialized<br />
    [javac]             DataRequest.close();<br />
    [javac]             ^<br />
    [javac] 3 errors</p>
<p>the following is the script</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on StringTokenizer by Raameshwar</title>
		<link>http://knowledgeair.wordpress.com/2008/02/08/stringtokenizer/#comment-11</link>
		<dc:creator>Raameshwar</dc:creator>
		<pubDate>Mon, 11 Feb 2008 15:52:51 +0000</pubDate>
		<guid isPermaLink="false">http://knowledgeair.wordpress.com/2008/02/08/stringtokenizer/#comment-11</guid>
		<description>#1
 String str = &quot;the cat sat on the mat&quot;;
        String stra[] = str.split(&quot; &quot;);
        System.out.println(&quot;Split length &quot; + stra.length);
        for (int i = 0; i &lt; stra.length; i++) {
            System.out.println(&quot; split &quot; + stra[i]);

Having space as delimitter gives the following output.

Split length 6

 split the
 split cat
 split sat
 split on
 split the
 split mat

Which is the expected one. so difference between split and tokenizer in terms of the result.

#2 Agreed :)
#3  Yes for dot (.) delimitter you have to use the escape sequence.  But still it is possible with split.
#4 Agreed
#5 Agreed
#6 I think it the other way round. StiringTokenizer is more flexible.

The most important con of the split is that it creates a String[] in the memory. When you parse huge data, say multiple paragraphs, all the splits are stored in the memory which is a big memory issue and performance hit. 

Conclusion: 

Use split for smaller texts such as date validation or similar simple types.  Tokenizer is a full fledged api which is used to handle huge data.  so use it for that purpose.

Regards,
Raameshwar.</description>
		<content:encoded><![CDATA[<p>#1<br />
 String str = &#8220;the cat sat on the mat&#8221;;<br />
        String stra[] = str.split(&#8221; &#8220;);<br />
        System.out.println(&#8220;Split length &#8221; + stra.length);<br />
        for (int i = 0; i &lt; stra.length; i++) {<br />
            System.out.println(&#8221; split &#8221; + stra[i]);</p>
<p>Having space as delimitter gives the following output.</p>
<p>Split length 6</p>
<p> split the<br />
 split cat<br />
 split sat<br />
 split on<br />
 split the<br />
 split mat</p>
<p>Which is the expected one. so difference between split and tokenizer in terms of the result.</p>
<p>#2 Agreed <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
#3  Yes for dot (.) delimitter you have to use the escape sequence.  But still it is possible with split.<br />
#4 Agreed<br />
#5 Agreed<br />
#6 I think it the other way round. StiringTokenizer is more flexible.</p>
<p>The most important con of the split is that it creates a String[] in the memory. When you parse huge data, say multiple paragraphs, all the splits are stored in the memory which is a big memory issue and performance hit. </p>
<p>Conclusion: </p>
<p>Use split for smaller texts such as date validation or similar simple types.  Tokenizer is a full fledged api which is used to handle huge data.  so use it for that purpose.</p>
<p>Regards,<br />
Raameshwar.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on StringTokenizer by Raj's blog</title>
		<link>http://knowledgeair.wordpress.com/2008/02/08/stringtokenizer/#comment-10</link>
		<dc:creator>Raj's blog</dc:creator>
		<pubDate>Mon, 11 Feb 2008 06:02:18 +0000</pubDate>
		<guid isPermaLink="false">http://knowledgeair.wordpress.com/2008/02/08/stringtokenizer/#comment-10</guid>
		<description>useful links

http://java.sun.com/j2se/1.4.2/docs/api/java/util/StringTokenizer.html

http://www.codeguru.com/forum/showthread.php?s=&amp;threadid=292394</description>
		<content:encoded><![CDATA[<p>useful links</p>
<p><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/StringTokenizer.html" rel="nofollow">http://java.sun.com/j2se/1.4.2/docs/api/java/util/StringTokenizer.html</a></p>
<p><a href="http://www.codeguru.com/forum/showthread.php?s=&amp;threadid=292394" rel="nofollow">http://www.codeguru.com/forum/showthread.php?s=&amp;threadid=292394</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on StringTokenizer by prethesh</title>
		<link>http://knowledgeair.wordpress.com/2008/02/08/stringtokenizer/#comment-9</link>
		<dc:creator>prethesh</dc:creator>
		<pubDate>Mon, 11 Feb 2008 05:58:12 +0000</pubDate>
		<guid isPermaLink="false">http://knowledgeair.wordpress.com/2008/02/08/stringtokenizer/#comment-9</guid>
		<description>useful link 

http://www.codeguru.com/forum/showthread.php?s=&amp;threadid=292394

http://java.sun.com/j2se/1.4.2/docs/api/java/util/StringTokenizer.html</description>
		<content:encoded><![CDATA[<p>useful link </p>
<p><a href="http://www.codeguru.com/forum/showthread.php?s=&amp;threadid=292394" rel="nofollow">http://www.codeguru.com/forum/showthread.php?s=&amp;threadid=292394</a></p>
<p><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/StringTokenizer.html" rel="nofollow">http://java.sun.com/j2se/1.4.2/docs/api/java/util/StringTokenizer.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on StringTokenizer by prethesh</title>
		<link>http://knowledgeair.wordpress.com/2008/02/08/stringtokenizer/#comment-8</link>
		<dc:creator>prethesh</dc:creator>
		<pubDate>Mon, 11 Feb 2008 05:46:08 +0000</pubDate>
		<guid isPermaLink="false">http://knowledgeair.wordpress.com/2008/02/08/stringtokenizer/#comment-8</guid>
		<description>Nice question Raameshwar. Below i have mentioned 6 difference between them. Need ur comments and suggestions for that.

&lt;strong&gt;# 1 &lt;/strong&gt;
 We are spliting string as delimiter. If there is multiple space in a word. Then we will get zero length strings in split, but we wont get in Tokenizer.

string: the   cat mat
Split:
	String str =&quot;the     cat  sat on the   mat&quot;;
	String stra[] = str.split(&quot; &quot;);
	System.out.println(&quot;Split length &quot;+stra.length);
	for(int i=0; i&lt;stra.length;i++){
           		System.out.println(&quot; split &quot;+stra[i]);
	}

	O/P:
	split length 5
	split the
	split 
	split 
	split cat
	split mat

StringTokenizer:
	StringTokenizer tok = new StringTokenizer(str,&quot; &quot;);
	 while (tok.hasMoreElements())
	          System.out.println(&quot;token &quot;+tok.nextElement());

	O/P:
	token the
	token cat
	token mat


&lt;strong&gt;# 2&lt;/strong&gt;
split( String )
split( String, int )
1. There is an option to stop at particular chop in split. For e.g If we want to stop after 3 chop then 
String spiting = &quot; This,is,we,want,to,do&quot;
String arrSplit []  = split.spliting(&quot;,&quot;,3);
for(int i=0; i&lt;arrSplit.length;i++){
           System.out.println(&quot; split &quot;+stra[i]);
        }
o/p:  
split This
split is
split we,want,to,do

But this option is not available in StringTokenizer.

&lt;strong&gt;# 3&lt;/strong&gt;
split will taker as regular experssion. It may cause problem in split. For e.g if we want to split the word with &quot;.&quot;. As of regular expression &quot;.&quot; means single character. But it is entirely different for StringTokenizer.

For e.g

Split :
	String str =&quot;This.is.we.want.to,do&quot;;
	String stra[] = str.split(&quot;.&quot;);
	System.out.println(&quot;Split length &quot;+stra.length);
	for(int i=0; i&lt;stra.length;i++){
           		System.out.println(&quot; split &quot;+stra[i]);
	}
O/P:
Split length 0

StringTokenizer:
	 StringTokenizer tok = new StringTokenizer(str,&quot;.&quot;);
	 while (tok.hasMoreElements())
	          System.out.println(&quot;token &quot;+tok.nextElement());

O/P:
token This
token is
token we
token want
token to,do


So there  is a special character in regular expressions, which means &quot;treat the following special character as a normal character&quot;.
That character is \\
 we can use like this String stra[] = str.split(&quot;\\.&quot;);


&lt;strong&gt;# 4&lt;/strong&gt;
 StringTokenizer is capable of returning delimiters whereas split() cannot.
 Ex :
    StringTokenizer st = new StringTokenizer(&quot;Java&#124;StringTokenizer&#124;Example 1&quot;, &quot;&#124;&quot;, true);
    
    //iterate through tokens
    while(st.hasMoreTokens())
      System.out.println(st.nextToken(&quot;&#124;&quot;));

  }
  
   Output:  Java &#124; StringTokenizer &#124; Example 1

&lt;strong&gt;# 5&lt;/strong&gt;
 StringTokenizer is very much faster than split().
&lt;strong&gt;# 6&lt;/strong&gt;
 split() is very flexible than StringTokenizer.</description>
		<content:encoded><![CDATA[<p>Nice question Raameshwar. Below i have mentioned 6 difference between them. Need ur comments and suggestions for that.</p>
<p><strong># 1 </strong><br />
 We are spliting string as delimiter. If there is multiple space in a word. Then we will get zero length strings in split, but we wont get in Tokenizer.</p>
<p>string: the   cat mat<br />
Split:<br />
	String str =&#8221;the     cat  sat on the   mat&#8221;;<br />
	String stra[] = str.split(&#8221; &#8220;);<br />
	System.out.println(&#8220;Split length &#8220;+stra.length);<br />
	for(int i=0; i&lt;stra.length;i++){<br />
           		System.out.println(&#8221; split &#8220;+stra[i]);<br />
	}</p>
<p>	O/P:<br />
	split length 5<br />
	split the<br />
	split<br />
	split<br />
	split cat<br />
	split mat</p>
<p>StringTokenizer:<br />
	StringTokenizer tok = new StringTokenizer(str,&#8221; &#8220;);<br />
	 while (tok.hasMoreElements())<br />
	          System.out.println(&#8220;token &#8220;+tok.nextElement());</p>
<p>	O/P:<br />
	token the<br />
	token cat<br />
	token mat</p>
<p><strong># 2</strong><br />
split( String )<br />
split( String, int )<br />
1. There is an option to stop at particular chop in split. For e.g If we want to stop after 3 chop then<br />
String spiting = &#8221; This,is,we,want,to,do&#8221;<br />
String arrSplit []  = split.spliting(&#8220;,&#8221;,3);<br />
for(int i=0; i&lt;arrSplit.length;i++){<br />
           System.out.println(&#8221; split &#8220;+stra[i]);<br />
        }<br />
o/p:<br />
split This<br />
split is<br />
split we,want,to,do</p>
<p>But this option is not available in StringTokenizer.</p>
<p><strong># 3</strong><br />
split will taker as regular experssion. It may cause problem in split. For e.g if we want to split the word with &#8220;.&#8221;. As of regular expression &#8220;.&#8221; means single character. But it is entirely different for StringTokenizer.</p>
<p>For e.g</p>
<p>Split :<br />
	String str =&#8221;This.is.we.want.to,do&#8221;;<br />
	String stra[] = str.split(&#8220;.&#8221;);<br />
	System.out.println(&#8220;Split length &#8220;+stra.length);<br />
	for(int i=0; i&lt;stra.length;i++){<br />
           		System.out.println(&#8221; split &#8220;+stra[i]);<br />
	}<br />
O/P:<br />
Split length 0</p>
<p>StringTokenizer:<br />
	 StringTokenizer tok = new StringTokenizer(str,&#8221;.&#8221;);<br />
	 while (tok.hasMoreElements())<br />
	          System.out.println(&#8220;token &#8220;+tok.nextElement());</p>
<p>O/P:<br />
token This<br />
token is<br />
token we<br />
token want<br />
token to,do</p>
<p>So there  is a special character in regular expressions, which means &#8220;treat the following special character as a normal character&#8221;.<br />
That character is \\<br />
 we can use like this String stra[] = str.split(&#8220;\\.&#8221;);</p>
<p><strong># 4</strong><br />
 StringTokenizer is capable of returning delimiters whereas split() cannot.<br />
 Ex :<br />
    StringTokenizer st = new StringTokenizer(&#8220;Java|StringTokenizer|Example 1&#8243;, &#8220;|&#8221;, true);</p>
<p>    //iterate through tokens<br />
    while(st.hasMoreTokens())<br />
      System.out.println(st.nextToken(&#8220;|&#8221;));</p>
<p>  }</p>
<p>   Output:  Java | StringTokenizer | Example 1</p>
<p><strong># 5</strong><br />
 StringTokenizer is very much faster than split().<br />
<strong># 6</strong><br />
 split() is very flexible than StringTokenizer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on StringTokenizer by Raameshwar</title>
		<link>http://knowledgeair.wordpress.com/2008/02/08/stringtokenizer/#comment-7</link>
		<dc:creator>Raameshwar</dc:creator>
		<pubDate>Fri, 08 Feb 2008 11:21:07 +0000</pubDate>
		<guid isPermaLink="false">http://knowledgeair.wordpress.com/2008/02/08/stringtokenizer/#comment-7</guid>
		<description>Ok. Let me know how it is better to String.split() method. Also let me know the cons of split(). 
No offenses , i am just trying to make this more interesting :-)

Raameshwar.</description>
		<content:encoded><![CDATA[<p>Ok. Let me know how it is better to String.split() method. Also let me know the cons of split().<br />
No offenses , i am just trying to make this more interesting <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Raameshwar.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
