java - Cannot instantiate the type Pair although not abstract -


trying write iterator returns pair: part of pairiterator

public pair next() {             this.counter ++;             pair p = new pair(this.l.get(counter - 1), this.l.get(counter));              //error occurs here          }  public class pair<e> {     private e e1;     private e e2;      public pair(e e1, e e2) {         this.e1 = e1;         this.e2 = e2;     }     public e first() {         return this.e1;     }     public e second() {         return this.e2;     } } 

getting

cannot instantiate type pair

... although pair not abstract class/interface. why happening?

check imports. (or ide) imported pair class.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -