Great question Akash! The book has extensive info on documentation, but the most important thing is to take the reader of the code along in your thinking. Like why is there a certain field on this class, rather than only "what does it represent".
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop