What will be the output of the following Java program?

class exception_handling {

        public static void main(String args[]) 
        {
            try 
            {
                System.out.print("welcome_to" + " " + 1 / 0);
            }
            catch(ArithmeticException e) 
            {
        System.out.print("java_program");       
            }
}

1
welcome_to
2
java_program
3
welcome tojava_program
4
welcome to java_program
5
None of the above

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation