Tino Intro To Java

Last modified: January 07, 2023

Printing and Commenting

Printing

To print in JavaScript, you can use "print" or "println".

To print in Java, you can use "System.out.print" or "System.out.println"

In Java, there is another method (aka. function) for printing: "System.out.printf"

"printf" allows you to format a string and print it. It is beyond the scope of this lesson, so don't worry about it for now.

Commenting

To comment in JavaScript, you can use // or /* */

Commenting in Java looks the same as commenting in JavaScript. To comment in Java, you can use // or /* */

In Java, there is another type of commenting called "javadocs". It is used to generate automatic code documentation. It is beyond the scope of this lesson, so don't worry about it for now.

Dark Mode

Outline