Results 1 to 3 of 3
Thread: Java help!!
- 11-04-2011, 07:41 PM #1
Member
- Join Date
- Oct 2011
- Posts
- 7
- Rep Power
- 0
- 11-04-2011, 11:53 PM #2
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
Re: Java help!!
Presumably you have some different variables in the super class and the subclass, any variables passed into this constructor that should be initialized in the super class should be passed in through super as you have done. For variables in the subclass, simple assignments work. Also, make sure you follow the requirements and check the pre and post conditions (perhaps throw an IllegalArgumentException if they fail).
- 11-05-2011, 12:29 AM #3
Re: Java help!!
Please study the content in this Lesson: Classes and Objects (The Java™ Tutorials > Learning the Java Language) and then post some compilable java code.


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks