adplus-dvertising
frame-decoration

Question

Choose the correct output for given set of code:
class Program
  {
      static void Main(string[] args)
      {            
          try 
          {
              Console.WriteLine("csharp" + " " + 1/0);
          }
          finally
          {
              Console.WriteLine("Java");         
          }
          Console.ReadLine();
      }
  }

a.

csharp 0

b.

Run time Exception generation

c.

Compile time error

d.

Java

Posted under C# programming

Answer: (b).Run time Exception generation

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Choose the correct output for given set of code: