1.作为操作符:
~符号作为java操作符时,代表一元的逐位取反操作。如:int i=10;i=~i;
10按位取反是-11,1按位取反是-2
2.Intellij中使用:
Set<String> associations = new LinkedHashSet<~>();
means String
, which is the same as in the declaration on the left side.
在Intellij中代表:“与声明相同”的简写,并不是java的语法。