change a functions argument’s values?

This may seem like a stupid question, but would this function actually affect the variable bool (there is greater context to how I’m going to use this, but this is basically what I’m unsure about)? (I am asking specifically about java)

void truifier (boolean bool) {
    if (bool == false) {
        bool = true;
    }
}

Answer

Consider a slightly different example:

public class Test {

    public static void main(String[] args) {
        boolean in = false;
        truifier(in);
        System.out.println("in is " + in);
    }

    public static void truifier (boolean bool) {
        if (bool == false) {
            bool = true;
        }
        System.out.println("bool is " + bool);
    }
}

The output from running this program would be:

bool is true
in is false

The bool variable would be changed to true, but as soon as the truifier method returned, that argument variable goes away (this is what people mean when they say that it “falls out of scope”). The in variable that was passed in to the truifier method, however, remains unchanged.