# I expect it to be 57 sometime!

Which famous quote is this simple Java code representing?

public class Foo {

private int result = 38;

public void foo() {
do {
thing(result);
} while (result == 38);
}

public void thing(int i) {
i += 19;
}

public static void main(String[] args) {
new Foo().foo();
}

}


P.S.: Sorry, I know it's easy

## 1 Answer

This:

Insanity: doing the same thing over and over again and expecting different results. Albert Einstein

• I agree with your answer. But I can't remember if java is pass by reference or pass by copy by default... – Going hamateur Aug 3 '16 at 14:29
• @Goinghamateur It's pass by value. Primitive types, like in this example, just get copied. If you're interested: I just found more detailed explanations here. – user14478 Aug 3 '16 at 14:36
• Thankee, I found a very good comment about balloons to clarify everything for me. – Going hamateur Aug 3 '16 at 14:50