Understanding inheritance in java : SuperclassVariable can reference a Subclass Variable

Migrated from logicaletter.com Superclass : A parent class Subclass : A child class that inherits Superclass class A{ //superclass or parent class //some generic code } class B extends A{ //subclass or child class of A //some generic code } it may seem esoteric at first, but its true that superclass variable can reference a subclass object .This aspect is quite useful when superclass object needs parameters same as subclass object which is not part of that superclass object....

October 23, 2018 · voidash

What are Generics in Java

Migrated from logicaletter.com Lets start why generics is needed rather than identifying what generics really are. Through the use of generics one can create classes,interfaces and methods and specify what kind of data it is working upon. Lets start up with example : Many algorithms logic is same no matter what kind of data they are working upon. Stack algorithm logic is same no matter which type of data you are working with ,i....

June 2, 2018 · voidash