:
interface InterfaceA {
default void display() {
System.out.print("#");
}
}
interface InterfaceB {
void display(); // دالة مجردة
}
class ImplementationClass implements InterfaceA, InterfaceB {
@Override
public void display() {
System.out.println("Display method in ImplementationClass");
}
}
public class Main {
public static void main(String[] args) {
ImplementationClass obj = new ImplementationClass();
obj.display();
}
}type of inheriance
1.single inheriance
2.multilevel inheriance
3.Hierarchical inheriance
4.hybrid inheriance
الخامسة متدعمش فيها الجافا
5. multiple inheriance
1.single inheriance
2.multilevel inheriance
3.Hierarchical inheriance
4.hybrid inheriance
الخامسة متدعمش فيها الجافا
5. multiple inheriance
the transitive natire of inheriance is reflected by this from of inheriance
Anonymous Quiz
23%
single
27%
multiple
34%
multilevel
16%
Hierarchical
❤1
💔1
why multiple inheriance is not supported in java???
to remove ambiguity
to provide more maintainable and clear design
to remove ambiguity
to provide more maintainable and clear design
a most common example af has relationship in java
Anonymous Quiz
84%
a person has a adders
16%
an address has a person
👍2
Forwarded from Deleted Account
Naming a unchecked exception by checked because it checks at
Anonymous Poll
13%
Any time
38%
Run time
41%
Compiler time
8%
Static time
has a relationship denotes a whole part relatiosnship where a part cannot exist whithout the whole
Anonymous Quiz
72%
✅
28%
❌
is another one of the core concepts of object oriented programing it focuses on establishing a strong has a relationship between the three class
Anonymous Quiz
39%
✅
61%
❌
if one composition object is destroyed all its parts are also be deleted
Anonymous Poll
41%
✅
59%
✅✅
means to provide a new implementation for a method in the subclass
Anonymous Quiz
85%
override
15%
overlloding
❤2