COMP 202 Lecture Notes - Lecture 25: Compile Time

150 views2 pages
Verified Note

Document Summary

Forreach loop is not going to be tested in the exam. Inheritance will not be tested in finals. Final focus more on syllabus after midterm (post midterm topics) Subclass inherits all the public or protected attributes and public methods of the super class won"t inherit constructors. A class derived from another class is called the subclass. The class from which subclasses are derived is called the superclass. Object class doesn"t have super class in java. The picture1 below gives the tree diagram that explains the relationship between object, subclass, superclass etc. For example, public class dog extends animal { The extends helps the class dog inherit all the methods from animal. Never give the same name to an attribute in the subclass with the same name to an attribute in a superclass. Overloading- is when two methods have the same name but different parameters (different signatures).

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