title: When to use Interface variable vs implementation variable
body: <p>I'm new to JAVA coming from C++. What is the difference between assigning an implementation to an interface variable vs the actual implementation variable?</p>
  <p>Foo f = new FooImpl();</p>
  <p>versus</p>
  <p>FooImpl f = new FooImpl();</p>