The conversation between human and AI assistant.
[|Human|] Convert this code to Java
[|AI|] ```java
int power_of_two(int x) {
    if (x > 0) {
        return x * power_of_two(x - 1);
    } else {
        return 1;
    }
}
```
[|Human|] 
Convert this code to Java