COE 318 Lecture Notes - Lecture 11: Static Variable

55 views2 pages

Document Summary

The quick way is to calculate the hash value of each object and u organize them by the hash values. Super refers to a variable that is a class higher so 10 + super. j (where super. j is 3) = Slide 9 answer is a prints: main, toronto. When nothhings is said it runs the default constructor, new object of child class, and we call child function which is parent function where parent function just prints out parent function. In the 3rd line of the main function, we call parentfunction so once again we print parent function. Finally in the last line of the main, we print example. parentvariable which is just the public int variable of 10. Overloading means that the different methods have the same name, diff signature but in the same class. The parent function is overloading, the child is overloading too.

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