Stanley Mungai wrote:Hi guys I am reading a text file but I do not want to read the whole of it. Is there a way I can make the Buffered Reader ignore or skip reading the lines between 57 and 88 and also the lines between 129 and 160?
Java is an Object-Oriented language, so here's a thought: create a Class that does it for you.
I suspect mine might look something like this (I've only included the basics):
and there's probably several ways to improve performance as well.
I leave the Range class up to you (me, I'd probably just extend java.awt.Point and add a
contains() method; but I'm lazy
)
HIH
Winston
[Edit] Actually, Point is a bad choice. It's inherently unsafe. But a wrapper to a Point...