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?
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?