Search Results

Search found 1 results on 1 pages for 'alantheweasel'.

Page 1/1 | 1 

  • Operation Problems in Java Generic

    - by alantheweasel
    I got some problem when i was learning Java Generic : interface calculator<T, R> { public void execute(T t, R r); } class executeAdd<T, R> implements calculator<T, R> { private T first; private R second; public executeAdd(T first, R second) { super(); this.first = first; this.second = second; } @Override public void execute(T t, R r) { // TODO Auto-generated method stub Object o = t + r // ERROR ! What i could do it ? } }

    Read the article

1