There are already many completely correct answers, so I will not repeat anything that has already been said, however, one of the methods that you may find acceptable is to make the variable a variable as a parameter:
String name = "George"; boolean age = 57; boolean iq = 66; Person person1 = new Person(name, age, iq); Person person2 = new Person(name = "Beth", age = 65, iq = 69);
A slightly simplified matter and, of course, not necessarily here, but in more complex cases (for example, with 5 similar buckers that you would need to keep in order), this would help:
draw1(g2, false, true, false, true);
or
draw1(g2, outline = false, bold = true, italic = false, underline = true);
Note. Ordering still matters (you can't switch in bold and italics, for example), but at least you can easily see which parameter does.
source share