Languages-Java [3i Infotech Placement]: Sample Questions 96 - 97 of 141

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 96


Write in Short

Short Answer▾

What is meant by class loader? How many types are there? Where we will use them?


  • Class loader is a part of JVM used to load the classes dynamically and on demand.
  • Different types of class loaders extent base class loader:
    • Bootstrap class loader loads the classes in rt. jar and 8n. jar.
    • Extension class loader loads the class in ext dir.
    • System class loader loads all other classes in the class path.

Question 97


Describe in Detail


What is inheritance?


Image Shows the Class
  • Deriving an object from an existing class is inheritance
  • Inheritance is the process of inheriting all the features from a class.
  • A class derived from another class is called a subclass, whereas the class from which a subclass is derived is called a superclass.
  • A subclass can have only one superclass, whereas a superclass may have one or more subclasses.
  • A subclass inherits the characteristics (properties and methods) of its superclass.
  • A vehicle is a superclass and a car is a subclass.
  • The car inherits all of the vehicle՚s properties.
  • The inheritance mechanism is very useful in code reuse.

Developed by: