Tuesday, February 9, 2016
Codecademy Learn Java tutorial walkthrough 7 comments
In this Codecademy.com Java exercise 7/12 Comments, the exercise requires you to "comment out" line 4 and make a multi-line comment.
Engineers use comment frequently to make their code more readable for other engineers and also their future self. Professional developers write thousands line of code in a matter of months or even days. It will be hard to remember all the nuances. Comments in plain concise English really helps. It's also a great way for beginners to take notes while learning to code.
"Commenting out" a line refers to prefixing the line with a // double slash in Java or surrounding the multi-line code (a code that continues on multiple lines) with /* and then ending with */
This seemingly trivial exercise is actually a testing method frequently used by developers to test what a line of code does or should not do. They comment out the target code line(s) to see how the program run without those line(s) of code.
In this exercise, part 2, you must write a multi-line comment. A single line comment marked with // won't pass part 2 of the exercise. Codecademy will throw an error.
See my sample code screenshot below:
Did you know that being a developer you are at an unique position to help the society? There are many public service opportunities to contr...
Can hack schools solve Silicon Valley's talent crunch? The truth about coding bootcamps and the students left behind http://t.co/xXNfqN...
In this downtown startup work space design the designers used fat boy bean bags and an extra wide step tiered staircase to create work space...
This review is updated continuously throughout the program. Yay I just joined the Udacity Nanodegree for Digital Marketing! I am such an Uda...