So well I'm just here wondering if there's a way to pass a variable through a statement. Something like this:

```
if (a < b) {
    double g = 1
} else if (a > b) {
    double g = 0
}
if (g = 1) {
    System.out.print("true");
} else {
    System.out.print("false");
}

```

Mainly saying, I want to set a variable if a statement is true or not, go to the next section of code and print out "true" or "false" and I pretty much am just wondering if this is possible without creating a new method (and of course if there is code for it).
Thank you.