Help a java noob :(

Soldato
Joined
28 Oct 2006
Posts
12,457
Location
Sufferlandria
My program is in the form:

main
{
int variable1 =0;
int variable2 =0;
int variable3 =0;

public void method1()
{
*stuff*
}

public void method2()
{
*stuff*
}

public void method3()
{
*stuff*
}
}

how do i make it so that if i cange a variable inside one method, other methods will use the updated value rather than the default, 0?
 
Back
Top Bottom