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.
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
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.
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
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
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?
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
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
@@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
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
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.
Very well explained.
vera level anna. keep rocking.
hi bro neenga java entha platform learn paninga nu sola mudiuma,for my referrence
How default access modifiers is not accessible by sub class but accessible by same package? Please explain sir
Superb sir ❤
very Useful
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.
bro na ketkurathu thappa irukalam .. ninga sllo tharatha vachi knowledge gain panni fake exp
certificate use panni poga mudiyuma
Bro bro oru mini project video pottrunga bro pls bro
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
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.
@@saro2k298 Thank you for the explanation 👍
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
yeah, we can access if its public.
tqu sir
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
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?
@@meenavinothviyanmivan Thanks for the Explanation
@@gowthamshanthi3368 okay
Sir why constructor cannot be inherited
Bro where we will use this private or protected access modifiers ? which scenarios? please explain
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
@@LearnAutomationOnline I had this question in a mock interview, whether input data can be protected using access modifiers?
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
@@LearnAutomationOnline thanks bro 👍🏼
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?
Yes. Child class can be anywhere
@@LearnAutomationOnline Congrats for 1k. When ll u announce d give away? 😜
Neenga vena ethavathu paathu seinga. Thalaivar Vadivelu solra Maari thaan, koolu kudika vena varen, kuduka onnumila. 😂😂😂
@@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
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
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.
Thank you so much bro, I understood the concept.