telephonic interview on java, microservives
Core Java 1.) Can you tell me briefly about oops principle with a real time example? Inheritance:- It is a way in which child object inherits common properties and behavior From parent object. Use of this is to promote code reuseability. Polymorphism:- 2 types of polymorphism are there compile time(overloading ) and runtime (overriding). Overloading:- to change the behavior of method based on change in arguments. Overriding:- To change the behavior of method defined in parent class in child class. Encapsulation:- It is used to bind data and behavior in together.It is promoted by making Instance varaibles private and access via getter and setter. Abstraction:- To hide implementation details from the client and exposing via interface or abstract class is know as abstraction. Example :- HashMap Map map = new HashMap(); m.put(“key”,”value”); As we can see, we can create and use the operations but underlying implementation is hid...