True or False: in the following code,
age is accessible outside of the AgingJeroo class.
public class AgingJeroo
{
public void increase()
{
int age = 0;
age = age + 1;
}
}
False: since age is declared within the method, it only is accessible within the method.
- True: since age is declared inside the AgingJeroo class, any other class can access it.
- False: since age is private, it cannot be accessed by methods.
- False: since age is declared as a field, it cannot be accessed by methods.
There are no hints for this question