Examveda
Examveda

In the following Java code, what can directly access and change the value of the variable name?
package test;
class Target 
{
 public String name = "hello";
}

A. any class

B. only the Target class

C. any class in the test package

D. any class that extends Target

Answer: Option C


This Question Belongs to Java Program >> Strings

Join The Discussion

Related Questions on Strings