15. Instance variables in a Java class are declared by
(a) including a line like "declare counter int;" in a class definition outside of any method definitions
(b) including them as formal arguments to class methods
(c) using them in assignment statements
(d) including a line like "int counter;" in a class definition outside of any method definitions
16. In the class defined below
class MyClass {
int age = 19;
void myMethod() {
int counter;
}
}
(a) age is an instance variable and counter is a local variable
(b) age is a local variable and counter is an instance variable
(c) both age and counter are instance variables
(d) both age and counter are local variables