Home / MCQ Bank / Computer
Computer Interfaces And Abstract Classes

What will be the output of the following Java program? class exception_handling { static void throwexception() throws ArithmeticException { System.out.print("0"); throw new ArithmeticException ("Exception"); } public static void main(String args[]) { try { throwexception(); } catch (ArithmeticException e) { System.out.println("A"); } } }

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option C • 0A

Related Computer Questions

What will be the output of the following C++ code? #include <iostream> #include <algorithm> #include <vector> using namespace std; int main () { int myints[] = {2, 4, 6, 8, 10}; vector<int> v(myints, myints + 5); make_heap (v.begin(),v.end()); cout << v.front() << '\n'; return 0; } What will be the output of the following Python expression? round(4.5676,2)? Select the method used to write single byte to a file? Which is not a valid file system? What is the purpose of the method createDocumentFragment()?