Comments Code could be commented using the following two methods: //to comment one line. /* . . . */ to comment multiple lines.