Skip to main content
0 votes
0 answers
54 views

In Java, having two interfaces: public interface SomeAbstractResult {} public interface SomeInterface { Collection<SomeAbstractResult> someMethod(); SomeAbstractResult someMethod2(); } ...
zajer's user avatar
  • 842
0 votes
1 answer
83 views

I have tried using both base class and interface and in both instances I am told a constructor that takes my arguments does not exist. I have two classes that are related to each other and I want to ...
horsemeat's user avatar
-3 votes
0 answers
27 views

Body: I am learning Multiple Inheritance in Python. In my code, I am initializing the parent classes by calling them explicitly by name, like this: I read that I should use super(), but when I use ...
jyotish's user avatar
  • 11
Best practices
0 votes
6 replies
165 views

Somewhat similar to this question, I have something like this: class DerivedA: public Base { void operation(const Base& x, const Base& y) override // pure virtual in Base { ...
josh_eime's user avatar
  • 176
0 votes
0 answers
49 views

I am having trouble wrapping my head around subclass mappings. I have 3 classes: @Data public class Parent { long id; String name; public boolean isEmpty() { return StringUtils.isEmpty(name)...
bkqdad's user avatar
  • 27
Advice
0 votes
9 replies
127 views

Explain please why the output is "Base" ? Isn't getClassName method inherited? class Base {     public String className = "Base";     public String getClassName() {         ...
J.J. Beam's user avatar
  • 3,171
3 votes
1 answer
196 views

I'm getting a TypeInitializationException when running this C# code. It happens when a constructor tries to add an instance to a static list that should already be initialized. You can run it here: ...
Özgür Utku's user avatar
0 votes
1 answer
128 views

I have a base class and multiple derived classes: public class Camera { } public class CameraManufacturerA : Camera { } public class CameraManufacturerB : Camera { } public class ...
Moj's user avatar
  • 47
Best practices
1 vote
6 replies
225 views

I'm building a Qt wrapper for RtMidi. As starting point I created two separate classes QMidiOut and QMidiIn that wrap RtMidiOut and RtMidiIn. I don't want to duplicate code for the common methods (e.g....
NoobNoob's user avatar
  • 114
-3 votes
0 answers
63 views

class parent{ private String x = "Parent"; public void printmsg() { System.out.println("value is "+ this.x); } } public class child extends parent{ ...
Bhupesh's user avatar
2 votes
0 answers
64 views

I'm trying to wrap a C++ class using SWIG that involves multiple inheritance and another class with a method returning a shared pointer to a class declared as an interface in SWIG. Here is a ...
user31707527's user avatar
1 vote
1 answer
79 views

I want to use manim to render a spiral, which is crucial for later animation. Even the output says that the first arrow's module is greater than the second arrow, the render result says that the first ...
YingKai Niu's user avatar
1 vote
3 answers
94 views

I'm using Python decorators to implement common functionality across multiple classes. The problem comes when I want the decorated classes to inherit from each other: super() doesn't seem to delegate ...
jezza's user avatar
  • 462
2 votes
0 answers
121 views

After upgrading from Hibernate 5 to Hibernate 6, a native query that used to work now fails with an “ORA-17006: Invalid column name” error. Entity definitions Base class: @Entity @Table(name = "...
Maksson's user avatar
  • 23
2 votes
2 answers
196 views

I'm making it using multi inheritance with a pair struct that contains an index and the type of the element in a recursive structure like this: template<int index, typename... ts> struct ok; ...
thefentmaster5's user avatar

15 30 50 per page
1
2 3 4 5
2860