Examveda
Examveda

What will be the output of the following Java program?
class dynamic_initialization 
{
    public static void main(String args[]) 
    {
        double a, b;
        a = 3.0;
        b = 4.0;
  double c = Math.sqrt(a * a + b * b);
  System.out.println(c);
    } 
}

A. 5.0

B. 25.0

C. 7.0

D. Compilation Error

Answer: Option A


This Question Belongs to Java Program >> Data Types And Variables

Join The Discussion

Related Questions on Data Types and Variables