browser version may changed due to that compatable problem search functionality may not responce , new functionalities may added ,you may search it in different machin and some code push into the production thise all the possible reasons.
Please correct (if I am wrong), when we create the instance of the dervied class, then we will get the print line from the derived class (new Dervied().method())???? but I think you mentioned that the printline from the base class will get printed???
Because derived class is extending base class. So that base class methods can be accessed by derived class object. In main method he is calling method(10) with integer value. So in base we have 2 overloaded methods. In that which is accepting integer as parameter will be called.
Polymorphism means we can achieve one task in multiple way using polymorphism we achieve method overloading and override And Encapsulation means Binding all data memeber and members methods into single unit is called encapsulation..
Difference between encapsulation and polymorphism? 1. Encapsulation means it is a process of acquiring the properties and behaviour is called as encapsulation 1. Polymorphism means an exibhiting more than one form (changes) is called as polymorphism 2. In encapsulation we can perform data hiding with the help of private keyword and private keyword it is an access modifier means i we prefix the variable with private variable we cannot access that variable in a different class. 2. In polymorphism the word of meaning is POLY means many & MORPHISM means different form 3. In Encapsulation if we need to access the private variable we can access the private variable with the help of getter and setter method Getter method: it is used to access the private variable and Setter method: it is used to modify the private variable 3. Polymorphism is classified into 2 types Run-time-polymorphism and Complie-time-polymophism RTP means it is the process of method called statement to method implementation during the run time i called as RTP And RTP is classified into 2 types Method over riding and Derived type casting CTP means it is a process of method called statement to method implementation during compile time is called as CTP And CTP is classified into 2 types Method over loading and Constructor over loading This is my answer sir🙂 And sir i want to give you mock if possible as a fresher
I am eagerly wait for my turn , I have shared my CV 2 month ago via email
browser version may changed due to that compatable problem search functionality may not responce , new functionalities may added ,you may search it in different machin and some code push into the production thise all the possible reasons.
Please correct (if I am wrong), when we create the instance of the dervied class, then we will get the print line from the derived class (new Dervied().method())???? but I think you mentioned that the printline from the base class will get printed???
Because derived class is extending base class. So that base class methods can be accessed by derived class object. In main method he is calling method(10) with integer value. So in base we have 2 overloaded methods. In that which is accepting integer as parameter will be called.
Polymorphism means we can achieve one task in multiple way using polymorphism we achieve method overloading and override
And Encapsulation means Binding all data memeber and members methods into single unit is called encapsulation..
Difference between encapsulation and polymorphism?
1. Encapsulation means it is a process of acquiring the properties and behaviour is called as encapsulation
1. Polymorphism means an exibhiting more than one form (changes) is called as polymorphism
2. In encapsulation we can perform data hiding with the help of private keyword and private keyword it is an access modifier means i we prefix the variable with private variable we cannot access that variable in a different class.
2. In polymorphism the word of meaning is
POLY means many &
MORPHISM means different form
3. In Encapsulation if we need to access the private variable we can access the private variable with the help of getter and setter method
Getter method: it is used to access the private variable and
Setter method: it is used to modify the private variable
3. Polymorphism is classified into 2 types
Run-time-polymorphism and Complie-time-polymophism
RTP means it is the process of method called statement to method implementation during the run time i called as RTP
And RTP is classified into 2 types
Method over riding and
Derived type casting
CTP means it is a process of method called statement to method implementation during compile time is called as CTP
And CTP is classified into 2 types
Method over loading and
Constructor over loading
This is my answer sir🙂
And sir i want to give you mock if possible as a fresher
Kya faida mock de ke testing jobs are over chose another field
To usne bol ki automation ka interviews lo...mze sb ata h manual
Who told u there is no job bro
Beta cloud me bhi job nahi hai 😂 to kya karega