```
public class Solution {
public boolean isPowerOfFour(int num) {
return num > 0 && Integer.bitCount(num) == 1 && Math.sqrt(num) % 1 == 0;
}
}
```

The first two conditions are for checking power of two: `num > 0 && Integer.bitCount(num)`

;

The last one is for further checking power of four: `Math.sqrt(num) % 1 == 0`

.