aspose file tools*
The moose likes Java in General and the fly likes count how many tokens are in the first line Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "count how many tokens are in the first line" Watch "count how many tokens are in the first line" New topic
Author

count how many tokens are in the first line

ben riches
Ranch Hand

Joined: Nov 08, 2002
Posts: 126
Hello everyone i have this code which is below but i am stuck with how i can printout how many tokens are in the first line
could anyone give me some ideas please
thanks
William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 986

Well it looks like you are processing the entire file, instead of just the first line.
You don't need the

loop if you are only concerned with the number of tokens on the first line.


Please ignore post, I have no idea what I am talking about.
William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 986

I don't see where "v2" is used, I don't see where "hh" is used, ...
Get rid of code which you are not actually using. This will help you understand what you are trying to do.
William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 986

I would suggest, as a start, that you read in the first line, tokenize it, than print out each token on a seperate line.
You need to understand what you have in "s", before you can start processing it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: count how many tokens are in the first line