COMP 202 Lecture 23: COMP 202 – Lecture 23 – This and constructors

21 views3 pages
jc123 and 40170 others unlocked
COMP 202 Full Course Notes
100
COMP 202 Full Course Notes
Verified Note
100 documents

Document Summary

Comp 202 lecture 23 this and constructors. Recall: classes: in order to create your own object types, first create blueprints, a class is a blueprint for an object. Recall: tostring() method: any class in java can have a tostring method, header must be public string tostring(, the tostring() method that you write will be called automatically when. You pass an object as input to a print statement. Recall: static vs non-static: a static attribute or method is defined for the entire class, non static is defined for each istance of the class. Each object gets its own copy of method or attribute: a static attribute or method should always be called on the class. The final keyword: if we declare a variable as final, the value of the variable can never be changed after it has been assigned, the static numdimensions attribute in the vector3d class should be final and not change.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents

Related Questions