Java: Nested "If" Statements and Declaring Variables?

I am working on a piece of code in Java and Ive stumbled into a roadblock.For some reason I cannot declare a variable inside of a nested "if" statemen

I am working on a piece of code in Java and I've stumbled into a roadblock.
For some reason I cannot declare a variable inside of a nested "if" statement. If anyone could explain why it is that this is not possible, I would very much appreciate that.

or:I am working on a piece of code in Java and I've stumbled into a roadblock.For some reason I cannot declare a variable inside of a nested \"if\" statement. If anyone could explain why it is that this is not possible, I would very much appreciate that.


or:This question is no longer relevant and will remain here until I figure out how to remove it, which I do not have the time for at this very moment.

Tags:inside,code,