Title: Parent classes and child objects - Sun Certified Java Programmer 310-065 - Lesson 75
Duration: 17 minutes
Summary: In this video, we continue our discussion of the Java certification exam 310-065. The first question we look at has to do with calling the parent’s class constructor for initialization. Another key point in this question has to do with using parent classes that point to child objects. As I mentioned before, this is correct syntax (for example a Shape reference pointing to a Rectangle object). The second question has to do with assertions: Use assertions to verify the arguments of private methods, and assertions can be disabled for a particular class. The third question tests our ability to walk through infinite loops, continue statements, and break with a label. Again, it is important here to determine that the code does not have syntax error before wasting time stepping through the loops. The fourth question uses the super keyword to call the parent class, but in this case the super keyword was used twice, and it is incorrect use of super to call the parent’s parent. The final question discusses the use of the equals() method. Note here that the equals() methods that is overridden takes an Object as a parameter.
Methodology of the development of example: Good coding standard and simplified design to prepare for the Java programmer certification exam CX-310-065.
Technology Used: Java – Core Concepts.
Keywords: class, object, super, extends, assert, for, while, continue, break, super, equals().












Post stats:
See the prices for this post in Mr.Bool Credits System below: