I am using a tab (/ t) as a delimiter and I know that some of my data is empty The fields are:
one-> gt; Two-> - & gt; Three ou - & gt; The tab is equal to what you can see as the empty field is still surrounded by the right tab. The data is collected using a loop:
while ((strLine = br.readline ()) = null {StringTokenizer st = new StringTokenizer (strLine, "\ t") ; String test = st.nextToken (); ...} However, Java ignores "empty string" and leaves the field.
Is there any way to stop this behavior and read Java in the blank field anyway?
There is a problem with StringTokenizer status will not be corrected < / Code>. The evaluation of this RFE has been said, I quote:
java.util.regex in the package 1.4.0 , we've essentially eliminated the need for the StringTokenizer . We will not remove the class for compatibility reasons. and then suggest using the method.
Comments
Post a Comment