MCQs > IT & Programming > Java > Consider below code: class Ex1{ public static void main(String args[]){ int x = 10; int y = new Ex1().change(x); System.out.print(x+y); } int change(int x){ x=12; return x; } } What will be the output?

Java MCQs

Consider below code: class Ex1{ public static void main(String args[]){ int x = 10; int y = new Ex1().change(x); System.out.print(x+y); } int change(int x){ x=12; return x; } } What will be the output?

Answer

Correct Answer: 22

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