CSCE 3193 Lecture Notes - Lecture 8: Instance Variable, Pop Quiz

33 views2 pages

Document Summary

String s = foo ; s = something else ; Mystring ms3 = mystringmanipulator(ms); s = foofoo ; when you initialize strings with constants, if identical strings are made, identifiers point to same id. equals compares strings char by char, == compares id. Keyword extends creates class which inherits attributes and behaviors form another class. Direct superclass- superclass form which subclass explicitly inherits. Indirect -any class above the direct superclass in the hierarchy. Java hierarchy begins with class object, every class inherits from. Subclass- new class; can add its own fields and methods, more specific. Object of subclass also treated as object of superclass. Object contains as members references to other objects. Class"s public members are accessible wherever the program has a reference to an object of that class or on of its subclasses. Private members only accessible within the class itself. Protected access is an intermediate level of access between public and private.

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