Line 8: error: cannot access JsonArray

```
public class Solution {
public int majorityElement(int[] nums) {
int len = nums.length;
int halfLen = (int) Math.ceil(len / 2.0F);
java.util.Map<Integer, Integer> map = new java.util.HashMap<>();
for (int i = 0; i < len; ++i) {
if (map.containsKey(nums[i])) {
int count = map.get(nums[i]);
if (count + 1 >= halfLen) {
return nums[i];
}
map.put(nums[i], count + 1);
} else {
map.put(nums[i], 1);
}
}
return -1;
}
```

}