in.close(); }catch (Exception e){//Catch exception if any System.err.println("Error: " + e.getMessage()); } } }
Joanne Neal
Rancher
Joined: Aug 05, 2005
Posts: 3011
9
posted
0
Instead of having a loop, just read the first line and do what you need to do with it, read the second line and ignore it, read the third line and do what you need to do with it and then close the input stream.
Joanne
preethi Ayyappan
Ranch Hand
Joined: Oct 04, 2007
Posts: 518
posted
0
Thanks for your reply.if you show me in codes ,that will do better.