You are on page 1of 3

1) What is meant by Object Oriented Programming?

OOP is a method of programming in which programs are organised as cooperati ve collections of objects. Each object is an instance of a class and each class belong to a hierar chy. 2) What is a Class? Class is a template for a set of objects that share a common structure and a common behaviour. 3) What is an Object? Object is an instance of a class. It has state,behaviour and identity. It i s also called as an instance of a class. 4) What is an Instance? An instance has state, behaviour and identity. The structure and behaviour of similar classes are defined in their common class. An instance is also called as an object. 5) What are the core OOP s concepts? Abstraction, Encapsulation,Inheritance and Polymorphism are the core OOP s co ncepts. 6) What is meant by abstraction? Abstraction defines the essential characteristics of an object that disting uish it from all other kinds of objects. Abstraction provides crisply-defined conceptual boundaries relative to the perspective of the viewer. Its the process of focussing on the essential characteristics of an obj ect. Abstraction is one of the fundamental elements of the object model. 7) What is meant by Encapsulation? Encapsulation is the process of compartmentalising the elements of an abtra ction that defines the structure and behaviour. Encapsulation helps to separate the contractual interface of an abstraction and implementation. 8) What is meant by Inheritance? Inheritance is a relationship among classes, wherein one class shares the s tructure or behaviour defined in another class. This is called Single Inheritance. If a class shares the structure or beha viour from multiple classes, then it is called Multiple Inheritance. Inheritance defines is-a hierarchy among classes in which one subclass inhe rits from one or more generalised superclasses. 9) What is meant by Polymorphism? Polymorphism literally means taking more than one form. Polymorphism is a characteristic of being able to assign a different behavio r or value in a subclass, to something that was declared in a parent class. 10) What is an Abstract Class? Abstract class is a class that has no instances. An abstract class is written with the expectation that its concrete subclass es will add to its structure and behaviour, typically by implementing its abstract operations. 11) What is an Interface? Interface is an outside view of a class or object which emphaizes its abstr

13) What is a subclass? Subclass is a class that inherits from one or more classes 14) What is a superclass? superclass is a class from which another class inherits. . In Java. 23) In Java. 21) What is meant by Persistence? Persistence is the property of an object by which its existence transcends space and time. 22) What is colloboration? Colloboration is a process whereby several objects cooperate to provide som e higher level behaviour. Object is the base class for all classes. 18) What is meant by static binding? Static binding is a binding in which the class association is made during c ompile time. 20) Define Modularity? Modularity is the property of a system that has been decomposed into a set of cohesive and loosely coupled modules. 15) What is a constructor? Constructor is an operation that creates an object and/or initialises its s tate. In Java. This is also called as Early binding. How to make an object completely encapsulated? All the instance variables should be declared as private and public getter and setter methods should be provided for accessing the instance variables. Its taken care by the JVM. 25)What is class? Class is blue print for objects. It is also called as Late binding. Class give s the generalstructure for objects. 16) What is a destructor? Destructor is an operation that frees the state of an object and/or destroy s the object itself. Most applications have such root classes. there is no concept of destructors. 17) What is meant by Binding? Binding denotes association of a name with a class. Overloading and Overriding are used to acheive Polymorphism in java. Class is collection of objects. 24) How is polymorphism acheived in java? Inheritance. 12) What is a base class? Base class is the most generalised class in a class structure. 19) What is meant by Dynamic binding? Dynamic binding is a binding in which the class association is not made unt il the object is created at execution time.action while hiding its structure and secrets of its behaviour.

Hierarchical and Multilevel 34)Can we achieve multiple inheritances in Java? With the help of interfaces we can achieve 35)What is interface? Interface is collection of final variables and abstract methods (We need not give final and abstract keywords and By default they are publ ic methods) 36)What is the difference between class and interface? Class contains implemented methods.26)What is object? Object is an instance of class. also called as dynamic polymorphism. Possible by dynamic method dispatc h . Object is real world entity which has state. Extracting the featur es of super class 32)Why inheritance is important? Reusability is achieved through inheritance 33)Which types of inheritances are available in Java? Simple. 27)What is encapsulation? Encapsulation is packing of data with their methods 28)What is abstraction? Abstraction is the process of identification of essential features of objec ts 29)What is data hiding? Implementation details of methods are hidden from the user 30)What is hierarchy? Ordering of classes (or inheritance) 31)What is inheritance? Extending an existing class is called inheritance. but interface contains non-implemented methods 37)What is polymorphism? Multiple (poly) forms (morphs)Same instance can respond different manners i s called polymorphism 38)Can we achieve run time polymorphism in Java? Yes. identity andbehavior.