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 +1 ;
}
}
False: since age is private, it cannot be accessed by methods.
True: since age is declared as a field it is accessible everywhere within the class.
True: since age is declared within the method, it is accessible within the method.
False: since age is declared as a field, it cannot be accessed by methods.
Answer
Check Answer
Need help?
l'd like a hint
 True or False: in the following code, the variable age is

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!