here's an eg which handles exceptions<br><br>/*
String to be Parsed */<br>String s="I LOVE YOU #CAROL"
;<br>String token;<br><br>if(s!=null) {<br> StringTokenizer
st=new StringTokenizer(s,"#");<br><br> // Loop as long
as long as there are tokens <br> // Otherwise there
will be an exception <br> // NoSuchElementException if
no tokens exist<br> // using the following code u
can avoid that<br> while(st.hasMoreElements()) {<br>
token = st.nextElement();<br> <br> }<br>
System.ou.println("I Love :"+token);<br><br><br>}<br>else<br>
System.out.println("This String Cannot be Parsed as value is null");