I have attended an interview for java programmer ,After a few personal questions ,the interviewer have asked me the question "What is encapsalution and abstraction" I was really happy with question ,and i have answered it as hiding the implementation details that are not necessary for the user to know. And Abstraction is showing of only the important details to user. only seconds after my answering ,the interviewer had another question for me. showing of only the important details to user ,that means hiding irrelevant data like implementation details to user. is it?
I have replied it as yes!!!
There comes another question from .So what is the difference between abstraction and encapsolution .I think there is no difference according to your answer.
I was like i dont know ,My hands were frozen ,was a really bad day for me
Can any one explain how would you answer if someone asks such a question to you