Interview Question
Country: -
I second hprem991
Java is Object oriented
1) Inheritance : It supports inheritance
2) Encapsulation : support through access modifier
3) Polymorphism : through method overloading and method overriding
If you want to ask what property of a language actually makes a language object-oriented, that's a bit of a philosophical question, in my opinion.
I was actually asked a ridiculous question along these lines in an interview today. I was asked "Name the 3 basic tenets of object-oriented programming." I proceeded to argue that the only thing that makes a language truly object-oriented is polymorphism (LSP). My interviewer chose to disagree but did not treat this as a matter of opinion.
java is defined as purely object oriented language due to its properties like encapsulation,inheritance and abstraction
encapsulation: the main class is is defined inside the class with acess specifiers and modifiers
inheritance: it has a concept of interface which helps to solve multiple inheritance concept
and primitive data types can be solved using type wrappers
and it is very much helpful in web applications ,gui etc
which are defined using objects
Oh Come On Guys ... Its they who are judging you.. Let them know what you know.. and what is correct... if I get the very basic or stupid question in any interview.. regardless of my expertise.. I would give my answer and if possible with added flavour of my experience regarding why is that so........
- hprem991 November 03, 2011So, its always suggested to answer the concepts of inheritance, polymorphism and Encapsulation in Java and how is being achieved to make Java an Object Oriented for this question.