1

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"; }

Correct Answer: any class in the test package

Make the most of this question

This page focuses on one JAVA MCQs question from Programming. After checking the answer, return to the topic list to practice more or run a timed set.

JAVA MCQs MCQ: 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"; } | Extra Education