Three permissible styles of comments line comments e.g. //comments on a line by themselves block comments e.g. /*comments on one line or can be extended across as many lines…