Why Does super() Cause Issues in Java Inheritance?

  • Context: Java 
  • Thread starter Thread starter the other guy
  • Start date Start date
  • Tags Tags
    Java
Click For Summary
SUMMARY

The discussion centers on issues related to the use of the super() method in Java inheritance, particularly when importing properties from a parent class into a subclass. The user encountered challenges while trying to override properties in subclass1, which inherits from parentclass. Key insights include the importance of providing concrete code examples when seeking help and the necessity of asking specific questions early in the development process to avoid last-minute confusion.

PREREQUISITES
  • Understanding of Java inheritance and the super() method
  • Familiarity with class and subclass structures in Java
  • Basic knowledge of method overriding in Java
  • Experience with debugging Java code
NEXT STEPS
  • Research Java inheritance and the role of super() in constructors
  • Learn about method overriding and its implications in Java
  • Explore best practices for debugging Java applications
  • Study how to effectively ask for help in programming forums
USEFUL FOR

Java developers, particularly those working with inheritance and object-oriented programming, as well as beginners seeking to understand the nuances of class interactions in Java.

the other guy
Messages
19
Reaction score
0
So, I'm new with the JAVA, and I am trying to import the properties of one file, into another. it looks like this-


the executible file will connect to a subclass file (called subclass1), but subclass1 is a subclass to another class file (parentclass)

the parent class will give details, and i want the subclass to override some of them, making ths subclass unique.

im in the 11th hour, id love if someone could for sure give me the answer and not tips since i really can't afford the time!
 
Technology news on Phys.org
Even if someone wanted to give you answers rather than just hints I'd say it must involve a great deal of luck if the answers are to useful for you because as far as I can see there are no specific questions to match the answers to.

However, I'm pretty sure that if you cite concrete code you have made and ask specific questions as to why it this or that doesn't work as you expect, you will get answers. And don't be afraid to ask questions early rather than wait until 11th hour where everything has to be rushed.
 
thats ok, i figured it out in the nick of time. silly problem with housekeeping turns out ;p
im going to keep those items in mind though.
 

Similar threads

Replies
1
Views
2K
  • · Replies 28 ·
Replies
28
Views
4K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
13K
Replies
1
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K