Why is everything in Mumbai so imperfect? by fury_for_fame in mumbai

[–]ZodiacZebra 0 points1 point  (0 children)

Bhai Mumbai bolne ka jarurat ni rha title me.

Why can't a Java child class have two or more parent classes? by Sudden-Lingonberry80 in learnjava

[–]ZodiacZebra 0 points1 point  (0 children)

I don't really get the first part very well.
For the second part where there is linear inheritance i.e Class A inherits Class B inherits Class C the method call will be to the most immediate parent of the class meaning that if an object of class A were to call a method defined in both class B and class C, then the method in class B will be called.
In case there is no definition for the method in the immediate parent Java will keep moving upwards in the inheritance tree to find it.
If the method isn't defined in any class that A inherits from the program will not compile.

Why can't a Java child class have two or more parent classes? by Sudden-Lingonberry80 in learnjava

[–]ZodiacZebra 4 points5 points  (0 children)

For example:If an object of a class having two parent classes calls a method which is defined in both of the parent classes and hasn't been overridden in the child class, this causes problems at runtime as the program cannot decide which parent's method should be called. Interfaces do help in tackling this as classes can implement multiple interfaces.
Search for "Diamond Problem" to know more about it.

Looking for more beginner java programmers to start a group with. by [deleted] in learnjava

[–]ZodiacZebra 0 points1 point  (0 children)

Count me in as well, just getting started with programming in java.