In Java, if a constant conflicts with a method in an interface. 1. If a constant conflict exists, a fully qualified name can be used in the Implementation interface (interface name. Constant name explicitly specifies the interface to which the constant belongs
If there is a method conflict, you only need to implement one method.
Public class HH {public static void main (string [] ARGs) {circle = new circle (7); float area = circle. getarea (); system. out. println ("Area of the circle:" + area); float girth = circle. getgirth (); system. out. println ("circle circumference:" + girth); circle. draw () ;}} class circle implements calculate, shape {// declare a variable to indicate the radius private float radius; public circle (float R) {radius = r ;} public float getarea () {float area = calculate. pI * radius * radi US; return area;} public float getgirth () {float circugirth = 2 * shape. pI * radius; return circugirth;} public void draw () {system. out. println ("draw a circle here! ") ;}} Interface calculate {float Pi = 3.14f; float getarea (); float getgirth () ;}interface shape {float Pi = 3.14159f; float getarea (); void draw ();}