Two methods defined within a class are shown below. What can be said about the variable x used in both methods?
  public int getSum(int y){

     return this.x + y; }
 public int getMult(int y){

   return this.x * y; }

Respuesta :

Hi! Well, the variable 'x' is preceded by 'this.'. I can't say for sure what language this is, but it's probably Java or a C language, right? Then the 'this' refers to the instance of the class.

So 'x' is an instance variable. That means it's a variable that belongs to an instantiated object.