-
In below code, what can directly access and change the value of the variable name?
package output;
class Test
{
public String name = "Interview Mania";
}
-
- any class that extends Test
- any class in the output package
- only the Test class
- any class
- None of these
Correct Option: B
Any class in the output package can access and change name.