Category: Java


  • What is Linked List ? A linked list is a linear data structure containing interconnected nodes through pointers. Since there is no concept of pointers in Java, each node holds the reference of another node, but the last element of the linked list refers to NULL, meaning the end of the list. A linked list…

  • Is a relationship is also known as inheritance. We can implement ‘is a’ relationship or inheritance in java using extends keyword. The advantage or inheritance or is a relationship is reusability of code instead of duplicating the code. Ex : Motorcycle is a vehicle Car is a vehicle, Both car and motorcycle extends vehicle.

  • Variables and methods of super class can be overridden in subclass. In case of overriding, a subclass object call its own variables and methods. Subclass cannot access the variables and methods of super class because the overridden variables or methods hides the methods and variables of super class.But still, java provides a way to access…