Inheritance Kya Hai? | Types of Inheritance | Java Inheritance Explained | Android Java Tutorial

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

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

  • @wscubetech
    @wscubetech  2 ปีที่แล้ว +3

    😎Hey, thanks for watching! We’d love to know your thoughts/doubts here in the comments.
    🔴 To learn Android App Development online with regular LIVE CLASSES, enroll now: forms.gle/qvhLEnfeUo8NadJM8
    👉For professional self-paced certification courses (pre-recorded), visit: bit.ly/Pre-Recorded-Course
    👉Don’t forget to SUBSCRIBE our channel for more such videos & valuable content: bit.ly/TH-cam-WsCubeTech

  • @akashshiv6225
    @akashshiv6225 2 ปีที่แล้ว +10

    Hidden best android development course.. in depth video about java .. thankk you so much 😀

  • @akibknowsit8030
    @akibknowsit8030 2 ปีที่แล้ว +4

    Gajab ka teaching techniques hai bhai. Thank you

  • @Himanshu-q9d
    @Himanshu-q9d 6 หลายเดือนก่อน

    good explanation thank you sir for this video

  • @aihtishamarfi6489
    @aihtishamarfi6489 2 ปีที่แล้ว +1

    Thank you

  • @akramshahzad3274
    @akramshahzad3274 8 หลายเดือนก่อน +1

    thanks sir

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

    very nice

  • @VaibhavAwasthi-xk7pr
    @VaibhavAwasthi-xk7pr ปีที่แล้ว

    Thnx bhai sir

  • @Sakina-l1y
    @Sakina-l1y 3 หลายเดือนก่อน

    jin logo ka itel i.j main alag alag class bna kr extend krny ma errors a rhy han then you can write it like this too
    package Main;
    public class practise extends ClassA {
    public static void main(String[]args){
    practise practise = new practise();
    int sum = practise.multiply (8,7);
    System.out.println("The sum is: "+sum);
    }
    }
    class ClassA extends ClassB{
    public int operations(int a,int b){
    return a+b;
    }
    }
    class ClassB{
    public int multiply( int a,int b ){
    return a*b;
    }
    }

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

    nice

  • @kunaludeg3194
    @kunaludeg3194 8 หลายเดือนก่อน

    Java supports multiple inheritance with the help of class it is not possible.
    but,
    With the help of interface it is Possible.

    • @Sakina-l1y
      @Sakina-l1y 3 หลายเดือนก่อน

      interface?

  • @coddingslug1778
    @coddingslug1778 ปีที่แล้ว

    public class superClass{
    int a=7;
    public void add(int a, int b){
    return a+b;
    }
    }
    public class subClass extends superClass{
    public static void main(String[] args){
    subClass s = new subClass();
    System.out.println("Programmer salary is:"s.a");
    System.out.println("Bonus of Programmer is:"+s.add);
    }
    }

  • @kdgaming580
    @kdgaming580 7 หลายเดือนก่อน

    Sir can we write two class in one file....?

  • @SauravKumar-c4d3b
    @SauravKumar-c4d3b ปีที่แล้ว

    ❤❤❤

  • @CAmdS8802
    @CAmdS8802 10 หลายเดือนก่อน

    You switched directly from Note pad to android studio but didn't tell how to handle it ... run in console...how to run without using mainActivity file...that's confusing.

    • @hemant64616
      @hemant64616 10 หลายเดือนก่อน

      bro vo intelijeidie pr kr rhe hai java ke code confuse mat ho

    • @CAmdS8802
      @CAmdS8802 10 หลายเดือนก่อน

      @@hemant64616 Android studio pe ni... Actually multi classes file jesey inheritance, method overriding etc me diqat hui... Na cmd me chal rha tha na Android studio me... So in Android studio I run as run with convergance then it worked.

    • @Sakina-l1y
      @Sakina-l1y 3 หลายเดือนก่อน

      bhayi us par bhi nhi horha buht masla h

  • @Sakina-l1y
    @Sakina-l1y 3 หลายเดือนก่อน

    now i got it agr kisi k ye nhi sh horha then try this
    public class Main {
    public static void main(String[] args) {
    SubClass s = new SubClass();
    System.out.println("Programmer salary is: " + s.a);
    System.out.println("Bonus of the programmer is: " + s.add(5, 6));
    }
    }
    class SuperClass {
    int a = 7;
    public int add(int a, int b) { // Specify the return type as int
    return a + b; // Return the sum of a and b
    }
    }
    class SubClass extends SuperClass {

    }