Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Javadoc Query

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys, I'm just doing my Javadoc now for the UrlyBird 1.3.1 and was wondering should I write javadoc for every private method and field for each class?

The Spec says ...javadoc must be used for each element of the public interface..

Thanks
Phil
 
Author
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know developers who passed with only writing comments for the public methods and constructors, when given the same instructions. So I would imagine that that would be okay.

I wrote Javadoc for private helper methods if their purpose or relation to the rest of the class wasn't immediately self-evident. But that was more for me, in case I wanted to refer to it later.

Eben
 
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Phil:
I believe javadoc is not required for private methods and fields, however it is good programming practice to document everything. It will make life much easier for whoever going to maintain your code.
 
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IN TERMS OF THE EXAM, It's probably helpful to document private methods because the concept is that the product will be passed along to junior developers. At least, that's the way it is on B&S.

RK
 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wrote javadoc for everything - although writing it was really boring
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I played it safe and documented everything and enjoyed every second of it :roll:

Jon
[ July 22, 2004: Message edited by: Jon Entwistle ]
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another thing to bear in mind is that javadoccing up your code towards the end of the project lifecycle can be a really, really good way of refreshing your memory on how everything works and fits together!

Particularly if you do the assignment over a longish period of time.

[edited for spelling]
[ July 23, 2004: Message edited by: Matt Pryor ]
reply
    Bookmark Topic Watch Topic
  • New Topic