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?
Foo f = new FooImpl();
versus
FooImpl f = new FooImpl();
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?
Foo f = new FooImpl();
versus
FooImpl f = new FooImpl();