1. What is method over loading?
    1. If a class contains multiple methods with the same name, but they are differ in number of parameters, type of parameters, and order of parameters.
  2. What is method over riding?
    1. if a sub class redefines the super class method with the same signature, then this concept is called method over riding.
    2. method over riding is used to change the existing behaviour which is inherited from the super class
  3. What is final keyword and finally?
  4. Order of try, catch, finally.
    1. try { } finally {} catch {} is this order correct?  no
    2. try { } catch {} finally {} is this order correct? yes
    3. try { } finally {}  is this correct? yes
  5. What is throw and throws keyword?
    1. Throws keyword is used declare an exception, which is similar to try{} catch{} block.
    2. Throw is used to throw an exception explicitly.
  6. What difference between array and ArrayList?
    1. Array is used to store elements of same type, and is in fixed size.
    2. ArrayList is used to store elements of same or different types, and is not fixed in size.
  7. What are the different collections?
    1. List
    2. Set
    3. Map
  8. What is the difference between list and set?
    1. List is a collection, which allows duplicate elements.
    2. List elements can be accessed via the index  ex:- list.get(0)
    3. List elements are ordered.
    4. Set is a collection, which doesn’t allow duplicate elements.
    5. Set elements can not be accessed via the index.
    6. Set elements are un ordered.
  9. What is hash map?
    1. Hash map is interface of MAP.
    2. It is used to store key value pair.
  10. Will HashMap allows duplicate key?
    1. It doesn’t duplicate key, but it allows duplicate values.
  11. What is inheritance?
    1. a class which acquires the properties of other class, this concept is called inheritance.
    2. the purpose of inheritance to avoid the duplicate code, and to manage  the code in hierarchical manner.
  12. What are the types of inheritance?
    1. Single Level
    2. Multi Level
    3. Multiple
    4. Hierarchical
    5. Hybrid
  13. is Multiple inheritance is possible in java?
    1. NO
  14. Why multiple inheritance is not possible in java?
    1. a class extends multiple classes.
    2. Assume, For ex A extends B,C and both class have same method lets say print()
      1. in this case, will class A gets print method of B or C
      2. If we create an object for class A, and invokes print(), then print() in class B or class C execute, To avoid these confusions java not decided to have multiple inheritance.
  15. How do we achieve multiple inheritance in java?
    1. its through the Interface.
  16. Why static method is main method?
    1. static methods can be invoked without creating object, that way main method can be invoke without creating object for that class.