1 Reply Latest reply on Jan 24, 2012 5:53 PM by jtahlborn

    instantiating anonymous Type as method argument...


      trying to do this, i guess i have stumbled upon a noob's syntax error. any help please?
          private <T extends Dimension> void fillArray(T dim, ArrayList<T> arrayList) {
              for (int i=0; i<dim.getDim();i++) {
                  arrayList.add(new <T>(i+1));
      the error is spotted in the third line and the compiler says: <identifier> expected