// CSE 142 Lecture 2 // Static methods, Data Types, Expressions, Variables // Always put a comment at the top of your class describing what it does. // This program demonstrates commenting. // Why would we write comments? public class Comments { public static void main(String[] args) { System.out.println("Commenting Example"); // Comment at the end of a line. /* This is a multiline comment. I don't need to put a // at the beginning of each line */ // Notice the '//' in a String is not a commnet, it's part of the String. System.out.println("// That prints a comment"); // Same for /* and */ in a String. System.out.println("/* And a multi-line"); System.out.println(" comment */"); // System.out.println("doesn't get printed"); } }