What would be the best way to count lines of code from Java classes excluding comments and blank lines.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
See JavaNCSS. Also be aware that LoC is a worthless “metric”.
I will now make a blatant appeal to authority by citing Dijkstra:
— EWD, On the cruelty of really teaching computing science
UPDATE: If you’re doing this as a practice exercise, then you should probably be using a parser and counting the actual statements.