• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 254
  • Last Modified:

what is the use of skip() in the BufferedReader class?

H i want to know the usage of the skip() in the BufferedReader class?
  • 2
1 Solution
Kevin CrossChief Technology OfficerCommented:
Hello haneefnb

It allows you to skip over a certain number of characters specified as a long value passed like skip(100) will skip over 100 characters so that when you call read() next you get the 101st character instead of the 1st from where you currently are in the buffered reader.

Hopefully that makes sense.


haneefnbAuthor Commented:
thank u mwvisa1

could u please give me a example for this
Kevin CrossChief Technology OfficerCommented:

BufferedReader br = new BufferedReader(new FileReader("anyfile.txt"));

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now