MCQs > IT & Programming > Java > public class A { private int m = 5; class N { private int m = 3; public void print() { System.out.println('m=' + m); } } public static void main(String[] args) { A a = new A(); N n = a.new N(); n.print(); } } What is the output?

Java MCQs

public class A { private int m = 5; class N { private int m = 3; public void print() { System.out.println("m=" + m); } } public static void main(String[] args) { A a = new A(); N n = a.new N(); n.print(); } } What is the output?

Answer

Correct Answer: m=3

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it