public class JavaApplication33 { public static void main(String[] args) { T t = new T(); t.test(); t.test2(); } } public interface Test { void test(); void test2(int a); } public class T implements Test { @Override public void test() { System.out.println("test"); } @Override public void test2() { System.out.println("test2"); } } Can you please tell me what is the error? I watch a lesson on YouTube about the interfaces, everything works for the author.
The error itself:
Error: java: method doesn’t override or implement a method from a supertype
Error: java: com.company.T is abstract; cannot be instantiated
And another such question: I read somewhere that methods of interfaces cannot be overwritten - I don’t know, or I read it crookedly, but why does he do just that?

public void test2() {should bepublic void test2(int a) {- апрtest2with an integer argument. You tried to implementtest2without arguments. There was no such option in the interface, therefore the compiler produced an error. - ߊߚߤߘ@Overridedirectives, the java file would have been built without warning, but the resulting code would have worked incorrectly. - ߊߚߤߘСуществующую сигнатуру никто не определил, поэтому...And on the signature without an argument to the compiler, don't care, this is another method. - vp_arthTwould still not compile: "error: it is not abstract and does not override the abstract method test2 (int) in Test" . - Regent