CSC207H1 Lecture : oct10c.docx

48 views5 pages
11 Jan 2013
School
Course
Professor

Document Summary

Access modifiers: private parent instance variables/methods can"t be accessed. A few quick points about abstract classes and interfaces: a class may define methods w/o giving a body. Each of those methods must be declared abstract. The class must be declared abstract too. The class can"t be instantiated: a child class may implement some or all of the interited abstract methods. If all, it"s not abstract and can be instantiated: if a class is completely abstract, we can choose instead to declare it to be an interface. October 10: some generics we"ve seen: comparable, public interface comparable , * compare this object with o for order. Suppose you wantd stacks of strings (and that java didn"t already implement them for you) Very non-generic stacks, can only deal with string objects: Stack. java: package nongeneric, public class stack, string[] contents; // the contents of this stack.

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