Why New Dream is abstract when I test? Could you help me please?
package fr.codegym.task.task13.task1305;
/*
Quatre erreurs
*/
public class Solution {
public static void main(String[] args) {
System.out.println(new Dream().HOBBY.toString());
System.out.println(new Hobby().toString());
}
interface Desire {
}
interface Dream {
public static Hobby HOBBY = new Hobby();
}
static class Hobby implements Dream, Desire {
public Hobby HOBBY(){
}
int INDEX = 1;
@Override
public String toString() {
INDEX++;
return "" + INDEX;
}
}
}