Why multiple inheritance is not supported in java? | Java Interview Questions | Ask Java | Code Bode

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ก.ย. 2024

ความคิดเห็น • 3

  • @INTELLECTOFFICIALII
    @INTELLECTOFFICIALII 3 ปีที่แล้ว +1

    What if we don't have same method names in both the classes?

    • @CodeBode
      @CodeBode  3 ปีที่แล้ว

      Even then we cannot use multiple inheritance because a developer might later add methods with same name intentionally or unintentionally in that case program will fail so to avoid this scenario multiple inheritance is not supported in java.

  • @anoopshetty3580
    @anoopshetty3580 2 ปีที่แล้ว

    What is diamond problem?