Considering the code below, can anyone tell me what is the use of Interface reference variable? I mean how will it be of help when there is a class that implements that interface? Has it got anything to do with casting?
interface Sample{int j=10;}
public class Main implements Sample{
public static void main(String [] args){ Sample joe=null; System.out.println(Sample.j); //joe.j also prints 10???