Here is the answer.
An object reference be cast to an interface reference when the object implements the referenced interface.
Yes it is possible.The class which you want to cast,it should be implemented that interface . Example:
List<String> list=new ArrayList<String> ();
List is interface, and arraylist is implemented by list. so that we can cast it into list reference.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.