java - create object of abstract class and interface -


can tell me how can create object of abstract class , interface. know cant intaniate absract class , interface.

thanks , regards, gautam

you can not instantiate abstract class or interface - can instantiate 1 of subclasses/implementers.

examples of such thing typical in use of java collections.

list<string> stringlist = new arraylist<string>(); 

you using interface type list<t> type, instance arraylist<t>.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -