Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Javadoc - public members only?

 
Muthaiah Ramanathan
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The instructions say that
javadoc style comments must be used for each element of the public interface of each class.


So does this mean that I don't need to provide the private, protected and default members in the javadoc? If I do so, only a very little information is generated..!

If I submit all members, will be there any penalty?

Regards,

Muthaiah.
 
Davinder Kohli
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I submitted my javadoc with public scope only. If you look at any javadoc out there, no one publishes their private, default or protected members. Look at it this way, the purpose of the javadoc is to allow the user to use your public APIs and they anyway cannot use your private members.

For the purpose of the exam, I would take a pragmatic approach(if given the choice).
 
Seb Mathe
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you look at any javadoc out there, no one publishes their private, default or protected members


I disagree : protected members are often documented.

I your class may be extended, you should document your protected members (even if it is not required for SCJD)
 
Davinder Kohli
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with you Seb, sorry I missed that. Incase the user wants to extend your class.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic