Java Complete Course: 19: Multilevel hierarchy in classes

Поділитися
Вставка
  • Опубліковано 18 жов 2024

КОМЕНТАРІ • 4

  • @kibascarlett9179
    @kibascarlett9179 Місяць тому +1

    My question is does the orders in these lines of constructor ... Shipment (double w, double h, double d, double m, double c){
    super (w,h,d,m) have any effect to the output?

    • @globalclassroom254
      @globalclassroom254  19 днів тому

      yes, make sure the same order is used in both the declaration and also when calling the constructor using super. Sorry for late response

  • @Denge-dq1qr
    @Denge-dq1qr 2 місяці тому

    Multi level hierarchy refers to a types of inheritance where a class is derived from another class ,which is also derived from another and so on.This form a chain of inheritance where a subclass inherits from another super class and another super class inherits from super class...

  • @sykesalex
    @sykesalex Місяць тому

    Here what i have learnt is that a sub class can be a super class of another subclass. like boxweight is a sub class of box and the boxweight becomes a super class of shipment so shipment is a subclass of boxweight. this is possible by using super