wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes writing a class(List) similar to that of StringTokenizer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "writing a class(List) similar to that of StringTokenizer" Watch "writing a class(List) similar to that of StringTokenizer" New topic
Author

writing a class(List) similar to that of StringTokenizer

aruncs kumar
Greenhorn

Joined: Apr 26, 2007
Posts: 2
I want to write a class in which a list which contains group of values say 15. i want to split according to the limit(given at the run time,for example if you give 5 as limit the result should be like this [ [0,1,2,3,4] , [5,6,7,8,9] , [10,11,12,13,14] ]. ) for this code i have done almost all the method such as hasNextList, nextList. at the moment i want to write a method for countList(). the thing is that i want to write the logic as similar to that of StringTkenizer.hereby i write down the code up to my knowledge.

so by this program i have done the hasNextList and nextList. the rest is countList. so please anyone help me as quick as possible.



[HENRY: Added Code Tags]
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Moving to the Beginners Forum.
For more information, please read this.


[My Blog]
All roads lead to JavaRanch
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38486
    
  23
Please use the CODE button to maintain indentation; your code is difficult to read otherwise.
We don't simply hand out answers like that; please show us what you plan to use for your methods.
You have >< somewhere; that must be a misspelling.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: writing a class(List) similar to that of StringTokenizer