Hello, do I need help with object-oriented programming in java help?
Implement constructors and destroyers to the base classes and derived from the application on figures
geometric to experience and understand how it works when inheritance is involved
- husoskiLv 71 month agoFavorite Answer
Yes, I'd definitely say you need help.
For one thing, Java doesn't have destructors (or "destroyers"). That's a C++ concept. There used to be something like a destructor in Java, though. The "finalize" method was originally intended to release resources held by an object before reclaiming it's memory during garbage collection. It never worked as intended, though, and was deprecated in Java SE 9. (The current version is 13.)
There are alternatives to destructors, but you'll need to learn more about the basics of Java inheritance in order to use them. One good place to begin, even though it isn't being updated any more, is the Java Tutorials website at oracle.com. It's valid through Java SE 8, but the core object-oriented programming concepts in Java haven't changed. (As mentioned, finalize() was deprecated, but it's use was discouraged for a couple of decades.)
That's part of a larger "trail" on "Learning the Java Language". The tutorials home page can be found at: https://docs.oracle.com/javase/tutorial/index.html
PS: Note in that first link that the preferred Java terms are superclass and subclass, rather than the more generic "base class" and "derived class". You might want to remember that, since the Java keyword for interacting with the superclass is "super", not "base" or "parent".
- keerokLv 71 month ago
Yes, you do need help.
That is what you were asking, right? Sadly, I know nothing about what you just stated so good luck with the next answerer.