CMSC 131 Lecture Notes - Lecture 4: Object-Oriented Programming, Parsing

97 views6 pages

Document Summary

Java has a list of keywords or reserved words that have a special meaning and may not be used for variable names, class names, or method names. These comments are not displayed during runtime but are useful in telling what your program does. For example, take our hello world example again: This will print hello world as an output. This is an example of a multi-line comment. Public static void main (string [] args) { //this is an example of a single line comment. /* this is also an example of a single line comment */ The output is still very much the same: But we have now added comments so that it is clear what it is that we are doing. In java, classes can be derived from classes. You can reuse the fields and methods of the old class without having to write an entirely new class.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions