What does a tilde in angle brackets mean when creating a Java generic class?

前端 未结 4 808
醉酒成梦
醉酒成梦 2020-12-02 11:06

I was reading through some JMockit examples and found this code:

final List actualItems = new ArrayList<~>();

What d

4条回答
  •  Happy的楠姐
    2020-12-02 11:37

    In IntelliJ IDEA, the ~ here:

    Set associations = new LinkedHashSet<~>();
    

    means String, which is the same as in the declaration on the left side.

提交回复
热议问题