In the following code, suppose that f is an instance of Foo. Answer Questions 2–3.
class Foo
{ int i;
static int s;
void imethod()
{ }
static void smethod()
{ }
}
Questions 4–6 are based on the following code:
class Foo
{ static int i = 0;
static int j = 0;
public static void main(String[] args)
{ int i = 2;
int k = 3;
{ int j = 3;
System.out.println("i + j is " + i+j);
}
k = i + j;
System.out.println("k is "+k);
System.out.println("j is "+j);
}
}
}