Java Crash course | 08 | Java Inheritance explained | Tamil | Java for Automation

Поделиться
HTML-код
  • Опубликовано: 11 дек 2024

Комментарии • 33

  • @meenavinothviyanmivan
    @meenavinothviyanmivan Год назад

    Very well explained.

  • @Anukarthik17
    @Anukarthik17 3 года назад

    vera level anna. keep rocking.

  • @nareshp4330
    @nareshp4330 Год назад

    hi bro neenga java entha platform learn paninga nu sola mudiuma,for my referrence

  • @Simple_working_women
    @Simple_working_women 2 года назад

    How default access modifiers is not accessible by sub class but accessible by same package? Please explain sir

  • @davidvictor2852
    @davidvictor2852 3 года назад

    Superb sir ❤

  • @sudhachandran3847
    @sudhachandran3847 3 года назад

    very Useful

  • @GokulSpenser-vf3qp
    @GokulSpenser-vf3qp 11 месяцев назад

    Hi Arul bro,
    I have a doubt, I understant a public, private, protected are access modifier but, static, abstract, final are also access modifer rah? I think I confised.

  • @nantha7128
    @nantha7128 Год назад

    bro na ketkurathu thappa irukalam .. ninga sllo tharatha vachi knowledge gain panni fake exp
    certificate use panni poga mudiyuma

  • @Arunkumar-lw1pb
    @Arunkumar-lw1pb 3 года назад

    Bro bro oru mini project video pottrunga bro pls bro

  • @gowthamshanthi3368
    @gowthamshanthi3368 2 года назад +1

    Hi Brother,
    Very big thanks for this clear explanation.
    Having one doubt/issue
    No Access modifier is mentioned as N for Subclass
    I have done the below
    In Same Package
    1.Have created Class A with Method that has no access modifier.
    say - void method1(){
    }
    2.Have Created Class B that extends Class A
    3.Created a Method in Class B and Tried to call method1() from class A
    My expectation is it should not be allowed as in the tabular column mentioned N for Sub Class.
    But the actual thing is i am able to call method1()(which does not have access modifier) from parent class and it is working.
    Please correct me if am wrong.
    Thanks

    • @saro2k298
      @saro2k298 Год назад

      If you don't use anything as access modifiers, then by default it is 'default access modifier'(one of the four access modifiers).. So u can call the methods in parent class from child class.

    • @gowthamshanthi3368
      @gowthamshanthi3368 Год назад

      @@saro2k298 Thank you for the explanation 👍

  • @workwork7337
    @workwork7337 4 года назад +1

    Hi Bro,
    Protected modifier la oru doubt with regards to sub class , for eg: in package named "alphabet" i have a class called "a" and
    another package "numbers" i have class named "one" so can we write "one extends "a" can we write like this . pls explain

  • @arunragavan442
    @arunragavan442 4 года назад +1

    tqu sir

  • @gowthamshanthi3368
    @gowthamshanthi3368 2 года назад +1

    Hi Brother,
    One doubt
    Actually we will be able to access the data and method of another class by creating an Object in the new class right ?
    Then what is the need of inheritance (Extends).
    I am seeing the only difference if we use Extends then we don't need to create any parent class reference for accessing the data and methods.
    Without using extends we need to create object to access the data and method of another class.
    Is my understanding right?
    Thanks

    • @meenavinothviyanmivan
      @meenavinothviyanmivan Год назад

      Actually we will be able to access the data and method of another class by creating an Object in the new class right ?
      Then what is the need of inheritance (Extends).
      Ans - No without giving the extends keyword we can't acquire the properties of another class. For example i will tel you one scenario. if you wanted to purchase a dress you wil go to a shop(say it as parent class) from there only you wil buy the dress(say it as child class). you wil use any kind of transportation to travel to the shop(say it as extends). without going to shop how can we purchase the dress. so here we are using extends keyword.
      Arul brother is this correct?

    • @gowthamshanthi3368
      @gowthamshanthi3368 Год назад

      @@meenavinothviyanmivan Thanks for the Explanation

    • @meenavinothviyanmivan
      @meenavinothviyanmivan Год назад

      @@gowthamshanthi3368 okay

  • @sathezsk457
    @sathezsk457 4 года назад

    Sir why constructor cannot be inherited

  • @Hello-RMS
    @Hello-RMS 2 года назад

    Bro where we will use this private or protected access modifiers ? which scenarios? please explain

    • @LearnAutomationOnline
      @LearnAutomationOnline  2 года назад +1

      Whenever we create a variable we will give an access modifier. This access modifier will provide the access to that variable based on the modifier we have given. When you are developing a big project you will deal with lot of packages and classes. There will be requirements that this variable should not be available to other classes in those scenarios we can use private and similarly other modifiers

    • @Hello-RMS
      @Hello-RMS 2 года назад

      @@LearnAutomationOnline I had this question in a mock interview, whether input data can be protected using access modifiers?

    • @LearnAutomationOnline
      @LearnAutomationOnline  2 года назад +1

      From an external file u will send the data to the variables and then using getters and setters you will retrieve. So we can use modifiers on input data as well. But not when they are in an external source

    • @Hello-RMS
      @Hello-RMS 2 года назад

      @@LearnAutomationOnline thanks bro 👍🏼

  • @karthikeyansugumar20
    @karthikeyansugumar20 5 лет назад

    In d table which u have given for Access modifiers, 4th column which is "subclass" can be in same package or different package. Correct ah?

    • @LearnAutomationOnline
      @LearnAutomationOnline  5 лет назад +1

      Yes. Child class can be anywhere

    • @karthikeyansugumar20
      @karthikeyansugumar20 5 лет назад

      @@LearnAutomationOnline Congrats for 1k. When ll u announce d give away? 😜

    • @LearnAutomationOnline
      @LearnAutomationOnline  5 лет назад +2

      Neenga vena ethavathu paathu seinga. Thalaivar Vadivelu solra Maari thaan, koolu kudika vena varen, kuduka onnumila. 😂😂😂

    • @karthikeyansugumar20
      @karthikeyansugumar20 5 лет назад

      @@LearnAutomationOnline Soon u ll be earnin in lakhs. Who knows like other youtuber's u might quit job & became full time youtuber. IT job - Periya kallu chinna laabam. RUclips - Chinna kallu baytha laabam :-D :-D

  • @rajasivagnanam6144
    @rajasivagnanam6144 5 лет назад

    Hi Bro,
    I am watching your videos and I am learning.
    I have doubt in this inheritance concept. For accessing A to B we use extends and for A to c do we need to use super, please confirm. If I want to access from A to D want should I prefer, Thank you

    • @LearnAutomationOnline
      @LearnAutomationOnline  5 лет назад +2

      Hi Raja, I presume this your question. Correct me if I'm wrong. A is the parent for B,C, and D. And you want to access the properties of A in all the child classes? If yes, we have to use extends keyword in all the child classes. Super is a keyword used in child classes. Let's say, from child class, you want to move the control to parent class we can use super keyword. If this is not what you are asking. Please let me know.

    • @rajasivagnanam6144
      @rajasivagnanam6144 5 лет назад +3

      Thank you so much bro, I understood the concept.