variables defined in a method are only known inside that method. If you want several methods to be able to access them, define them at the class level as instance variables.
A better solution is...
Type: Posts; User: Norm
variables defined in a method are only known inside that method. If you want several methods to be able to access them, define them at the class level as instance variables.
A better solution is...
Are those two variables defined in scope with where they are being used? In scope means defined within the same {}s as where used.
class A_Class {
int classVar; // define at class level; in...
Please copy the full text of the error message and paste it here. It has important info about the error.
Can the definitions of the methods that compute the totals be changed to have the methods...
Is this what you are asking:
result = totalOfIncome - totalOfBills;