interface customer { int a=20; void purchase(); } class Owner implements customer { @Override public void purchase() { System.out.println("customer bought "+a + "kg"); } } class A { public static void main(String[] args) { System.out.println(customer.a+"kg");/* it can be call without making an obj that is why its static*/ } }