Does it make any difference and which is a better practice ?
Programming to an interface rather to an implementation it's the preffered way, Read more here --> What does it mean to "program to an interface"? . The difference is that you follow a contract rather than an implementation if you have to change the implementation with the same contract you ensure that you only have to change the object creation part.
In your example if you define like this
A newInstance = new B();
You only can use methods that are visible in A
contract.
And in this case:
B newInstance = new B();
You can use methods that are visible in B
contract, and as B has a IS-A
relationship with A
you can use A
methods too.