views:

45

answers:

1

In this example from the App Engine docs, why does the example declare contactInfos like this (no Generics):

import javax.jdo.annotations.Element;
// ...
    @Persistent
    @Element(dependent = "true")
    private List contactInfos;

instead of like this, using a Generic:

import javax.jdo.annotations.Element;
// ...
    @Persistent
    @Element(dependent = "true")
    private List <ContactInfo> contactInfos;
+1  A: 

Generics aren't required, just highly recommended.

Specifying List<ContactInfo> is absolutely doable in App Engine, I can't imagine it was an indication that generic lists aren't allowed in App Engine.

Jason Hall