CSC 120 Lecture Notes - Lecture 2: Backslash, Javadoc
CSC 120 verified notes
2/22View all
Document Summary
Csc 120 lecture #2- hello, world(continued)+ data p1. In order to fix that we need back slash and quotation mark(\(cid:1689)). This would be same as: how to print quotation mark: Error, there"s an extra quotation mark one quotation mark((cid:1688)). System. out. println((cid:1688) \ this is sparta\ said king leonidas(cid:1689)) Now you get a problem: how do you print back slash. Backslash(\) is the same as two back slashes(\). To print 2 backslash you need to put 4 backslash, After a double forward slash(//), everything is a comment on that line. With this you can comment for multiple lines. It starts with forward slash and star(/*) and to end the comment you put star and forward slash(*/) and every line must start with a star(*) You use this when you"re writing formal apis for your code, which are generated by the javadoc tool.