Why are there braces {}
in the following code
Type type = new TypeToken<ArrayList<ExampleItem>>() {}.getType();
If I understand correctly the normal Java syntax would be ClassName().MethodName(). Why are a space and the braces inserted between the class constructor and the getType method?
Aucun commentaire:
Enregistrer un commentaire