我将如何编写一个 if 语句: if pos2[targetPos3] doesn't point to a hashset (is not a hashset) ?我试过了,但它仍然给了我一个空点异常。
Object[] pos2;
int targetPos3;
targetPos3 = word.charAt(2) - 'a';
if(pos2[targetPos3] != (HashSet<String>) pos2[targetPos3]){
System.out.println("Sorry");
}