Page 1 of 1

Quick question

Posted: Tue Jan 04, 2011 10:06 am
by Minutis
Class names in example are only for showing purpose, you can give any other classes in answers.
BiMap is interface and ImmutableBiMap is Class implementing that interface.


What is the difference between these two declarations:
[*]BiMap<type, type> name = new ImmutableBiMap<type,type>();
[*]ImmutableBiMap<type,type> name = new ImmutableBiMap<type,type>();

In what cases which declaration should be used?

Re: Quick question

Posted: Tue Jan 04, 2011 10:51 am
by JIV
use interface unless you need something implementation specific.