Interface reference

If I have an interface A and I create a reference of A and set it equal to a class that implements the interface B how is this useful? Why would this be done?
[165 byte] By [java4life87a] at [2007-10-3 2:40:10]
# 1
http://www.javaworld.com/javaworld/jw-08-1999/jw-08-interfaces.html
ValentineSmitha at 2007-7-14 19:38:28 > top of Java-index,Java Essentials,New To Java...
# 2

Or do you mean:interface A {

}

interface B {

}

class C implements A, B {

}

A ref1;

B ref2 = new C();

ref1 = (A)ref2;

This should work.

jfbrierea at 2007-7-14 19:38:28 > top of Java-index,Java Essentials,New To Java...