Home / MCQ Bank / Computer
Computer Exceptions

What will be the output? class MyClass{ public String test(){ try{ System.out.print("One"); return ""; } finally{ System.out.print("Two"); } } } public class Test{ public static void main(String args[]){ MyClass m = new MyClass(); m.test(); } }

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option C • One Two

Related Computer Questions

Which of the following dimension type graph is shown in the below figure? What will be the output of the following Python code? True = False while True: print(True) break What is the default return type of a function? Taxes paid come under which group What is the purpose of the 'static' keyword in a function declaration in C++?