I\'ve following class
class MyClass implements Intrfc {
String pickmeUp = \"Its Me\";
public static void main(String[] args){
Intrfc ob = new MyClass();
ob.pi
Is there any way to access class variable using Interface type ?
No. That is the whole point of an interface.
And yes, interfaces only give you behavior (methods), not "state" (variables/fields). That is how things are in Java.
Of course, you can always use instanceof to check if the actual object is of some more specific type, to then cast to that type. But as said, that defeats the purpose of using interfaces!