About 2,710,000 results
Open links in new tab
  1. java - Is there any way of using Records with inheritance ... - Stack ...

    Aug 27, 2020 · I know it's a little bit earlier but this is an experimental test that I'm doing. The main problem here is involving inheritance. I have a class B which extends a class A. Is there any …

  2. java - How to enable enum inheritance - Stack Overflow

    Feb 26, 2016 · 3 We Fixed enum inheritance issue this way, hope it helps Our App has few classes and each has few child views (nested views), in order to be able to navigate between …

  3. java - When do I use super ()? - Stack Overflow

    I'm currently learning about class inheritance in my Java course and I don't understand when to use the super() call? Edit: I found this example of code where super.variable is used: class A { ...

  4. inheritance - Are static methods inherited in Java? - Stack Overflow

    Apr 24, 2012 · 3 Static methods are inherited in Java but they don't take part in polymorphism. If we attempt to override the static methods they will just hide the superclass static methods …

  5. java - Call a child class method from a parent class object - Stack ...

    A parent class should not have knowledge of child classes. You can implement a method calculate() and override it in every subclass: class Person { String name; void getName(){...} …

  6. inheritance - Using a private variable in a inherited class - Java ...

    Mar 21, 2013 · Need to have more understanding about the private variables and inheritance. Earlier my understanding was if there is field in a class and when I'm inheriting the class, the …

  7. java - Difference between Inheritance and Composition - Stack …

    Mar 8, 2010 · Are Composition and Inheritance the same? If I want to implement the composition pattern, how can I do that in Java?

  8. inheritance - Is there a way to override class variables in Java ...

    Mar 26, 2009 · In short, no, there is no way to override a class variable. You do not override class variables in Java you hide them. Overriding is for instance methods. Hiding is different from …

  9. inheritance - Is it possible to hide or lower access to Inherited ...

    Dec 31, 2015 · According to the Java Language specification it is possible to override access specifications on inherited methods to make them more public, but not more private.

  10. Java Constructor Inheritance - Stack Overflow

    Oct 29, 2009 · Now, trying to guess why Java doesn't support constructor inheritance, probably because a constructor only makes sense if it's talking about concrete instances, and you …