I just started programming in Groovy. I noticed one strange behavior and could not find an explanation for it.
I created the Java interface TestInterface.java
public interface TestInterface {
public void m1();
}
I created the Groovy class TestG.groovy
class TestG implements TestInterface {
}
I created the Java class TestJ.java
public class TestJ implements TestInterface{
@Override
public void m1() {
throw new UnsupportedOperationException("Not supported yet.");
}
}
My problem with TestG is why I am not getting any error for implementing an abstract method or declaring a class as abstract.
Which is different from java and Groovy, because I needed to implement abstract methods or declare a class abstract in Java, but not Groovy.
source
share