'How do you explain what type of object is the show in the code?

when I create an interface object implementing the abstract methods (through anonymous classes). What type of object am I creating? with an example the question will be better understood

public class Class1{
    public static void main(String...args){
    Interface1 object1= new Interface1(){
    @Override
    public method1(){
    System.out.println("im the method");
    }
    }
System.out.println(Object1.getClass());
}

this returns the class Class1. how can you explain this?

an explanation of my doubt



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source