Hi, guys. Well i gonna say my problem....
When i call a method por second time the method loses his value. so how the method dont loses his value?
PD: sorry about my poor redaction, english is not my main languaje
>>54520062
Install Gentoo
The debugger is your friend.
also why are you using a switch statement?
>>54520062
el peruano
>>54520062
Not sure I understood, but did you try sending b by reference?
>>54520062
Protip: Reformat the code, it's too hard to follow with the indentation like that.
Now it's not clear what you're trying to do, you can only call Test() when b = 1, but that will break out of the while look on line 27 after Test() returns. If you want to modify the value of b inside Test(), you'll need to pass it by reference (or have it return a value).
>>54520062
Instalo Gentoo
>>54520062
>he chose java instead of python
>>54520062
I think you should start learning c++
>>54520963
this desu
python is a great language for people who clearly don't know how to program
Install poo in loo
Not sure what you are asking. In Java, integers are non reference types. Meaning when you pass an integer to a method, that method creates a copy of it. In this case, b in test and b in the other method do not share a memory address and are simply copies. You would need to return the value of b in test and assign it to b in the other method to modify it.
Also, the while loop condition in main will always be true with your implementation. The value of int b in main will always equal 0 because of reasons stated above.
>his