Results 2 issues of Elif

I cant use this in java, can you pls show me an example code for java? i tried so many ways but it doesnt work idk why.