There is an abstract class:
public abstract class Drink { public void taste(){ System.out.println("Вкусно"); } } In theory, it is forbidden to create copies of it, but the IDE helped circumvent this prohibition in the following way:
public static Drink getDeliciousDrink() { return new Drink() { @Override public void taste() { super.taste(); } }; } What happens when overriding the taste function and why can I create an instance of this class?