Two Laptop Bag
The moose likes I/O and Streams and the fly likes Ignoring white space Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Ignoring white space" Watch "Ignoring white space" New topic

Ignoring white space

roopkarthick manoharan

Joined: Dec 21, 2004
Posts: 1
I want to find the effective number of line in a .java file(excluding the comments and white spaces)

How to ignore the lines without any code(blank lines).
Joe Ess

Joined: Oct 29, 2001
Posts: 9137

This sounds like homework. Why don't you show us what work you've done so far and we can discuss it.

[How To Ask Questions On JavaRanch]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Ignoring white space
jQuery in Action, 3rd edition