Discussion Forum

  1. Home
  2. »
  3. Languages
  4. »
  5. What is the output of...
What is the output of this program?

    class Output 
    {
        public static void main(String args[]) 
        {
           try 
           {
               int a = 0;
               int b = 5;
               int c = a / b;
               System.out.print("Hello");
           }
           catch(Exception e) 
           {
               System.out.print("World");
           } 
        }
    }

Hello

World

HelloWOrld

Compilation Error

Answer: A . Hello
0Shares
0 0

If you think the posted answer is wrong or Confused About the Answer? Ask for Details Here

Know Explanation? Add it Here
we’ll review your comment and contact you soon….

Leave a Reply

Your email address will not be published. Required fields are marked *

error: You are not allowed to do so.....
0Shares
0
Scroll to Top