Question 85 / 297:  What statement,inserted independently at // insert statement here, would produce output "Body" ?
public class Body {

String name = "Body";

public static void main(String[] args) {

System.out.println(new Body().new Heart().getPName());

}

class Heart {

String name = "Heart";

String getPName() {

// insert statement here

}

}

}

A  return Body.name;
B  return Body.this.name;
C  return super.name;
D  return this.super.name;
<< First < Previous Next > Last >>
Exam Home Page
Ask
Madison Christian
Start Exam
Copy and paste the following HTML code into your website or blog.
<iframe src="https://www.jobilize.com/embed/java-certification-questions" width="600" height="600" frameborder="0" marginwidth="0" marginheight="0" scrolling="yes" style="border:1px solid #CCC; border-width:1px 1px 0; margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe>