Why does abstract class support static and instance block and interface does not? An abstract class also supports a constructor even though we can't instantiate an abstract class.
abstract class Abs{
final int x;
final int y;
final static int z;
public Abs(){
x=10
}
{
y=10;
}
static{
z=10;
}
}
In above code, I'm initializing a variable at run time, but the same thing is not applicable with interface. Why?