LOC in Java

LOC in Java

3
NewbieNewbie
3

    Jan 12, 2009#1

    Can UE count the number of lines of code in a Java file?
    (not # of lines in the file, # of lines of code)

    236
    MasterMaster
    236

      Jan 12, 2009#2

      What's the difference? Just empty lines or also lines that contain only comments? Or...?

      3
      NewbieNewbie
      3

        Jan 12, 2009#3

        yes, something like that...don't count empty lines, comments.
        One way to count LOC is to count semi-colons, but that is a bit simplistic.

        262
        MasterMaster
        262

          Jan 12, 2009#4

          Sure, a precise definition of how to count LOC is needed as explained in the Wikipedia article Source lines of code.

          If you have a good understanding of your coding standards you could perhaps code a script to count LOC for your projects, but why not use a tool made for this exact purpose ? You might even be able to integrate such a tool with UE as a User Tool.

          I have no experience with tools for counting LOC - but these came out on top in a google search: