-3
   private TableColumn<?, ?> colname;

I want to know what is use of this in declaration of tablecolumn.

Suresh Atta
  • 120,458
  • 37
  • 198
  • 307

2 Answers2

1

In Java, the ? type is simply a wildcard. It means any class. You can read more on this at http://docs.oracle.com/javase/tutorial/java/generics/wildcards.html

Rabbyte
  • 343
  • 1
  • 3
  • 7
0

Probably, you got this TableColumn<?, ?> wildcard based definition from skeleton code generated by JavaFX SceneBuilder. When SceneBuilder generates the code, it doesn't know the types to be applied to table columns, so it just generates wildcard types.

You should edit the the declaration to supply the appropriate types for your table column, for example TableColumn<Person,String>, unless you really want to use wildcard types, which is unlikely for this case. In the sample I provided, Person is the type of each row item in a table and String is the type of a field of person to be represented in the table column (for example a firstName).

jewelsea
  • 150,031
  • 14
  • 366
  • 406