--
Hari
Hari Hara Kumar wrote:Could any one explain me why and how the ArrayList is an AbstractClass
I found that it implements AbstractArrayList andimplements List interface.
How to justify on this?
Mohamed Sanaulla | My Blog | Author of Java 9 Cookbook | Java 11 Cookbook
--
Hari
Hari Hara Kumar wrote:
But, I got couple of interview questions stating ArrayList is an abstract class and please mention the methods which needs to be implemented?
Mohamed Sanaulla | My Blog | Author of Java 9 Cookbook | Java 11 Cookbook
Hari Hara Kumar wrote:I do exactly know the abstract class and its necessity
But, I got couple of interview questions stating ArrayList is an abstract class and please mention the methods which needs to be implemented?
--
Hari
Hari Hara Kumar wrote:Oh ok.
I might wrongly understood the question.
List<Employee> list = new ArrayList<Employee>();
Could any one explain what happens behind the screen? I know its a silly question but i am bit confused here.
Steve
Hari Hara Kumar wrote:I might wrongly understood the question.
Could any one explain what happens behind the screen? I know its a silly question but i am bit confused here.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Winston Gutkowski wrote:
It should also be noted that ArrayList is NOT final, so you can extend it to create a class of your own if you want; probably pointless, but it can be done.
Winston
Dennis Deems wrote:If you have a class that needs to know when elements are added to or removed from a List, then you need a list that can be observed and which notifies listeners when these events occur. You could make your own implementation of the List interface from scratch, but simpler is to extend ArrayList and override the add/remove methods.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |