Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class LListSent<T> implements Iterable<T>{
- //...
- public T get(int pos) {
- //...
- }
- //...
- private class LListSentIterator {
- private final LListSent list;
- private int currPos;
- private LListSentIterator(LListSent list) {
- this.list = list;
- currPos = 0;
- }
- //...
- @Override
- public T next() {
- return list.get(currPos++); //exception in this line
- }
- }
- }
- incompatible Type: Object cannot be converted to T
- where T is a type-variable:
- T extends Object declared in class LListSent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement