Question: True or False: in the following code, the variable age is accessible within the method. public class AgingJeroo { private int age; public void increase
True or False: in the following code, the variable age is accessible within the method.
public class AgingJeroo
private int age;
public void increase
age age ;
False: since age is private, it cannot be accessed by methods.
True: since age is declared within the method, it is accessible within the method.
True: since age is declared as a field, it is accessible everywhere within the class.
False: since age is declared as a field, it cannot be accessed by methods.
Answer
SiiiCheck Answer
Need help?
Id like a hint
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
