Examveda
Examveda

What will be the output of the following Java code?
class conversion 
{
    public static void main(String args[]) 
    {
        double a = 295.04;
        int  b = 300;
        byte c = (byte) a;
        byte d = (byte) b;
        System.out.println(c + " "  + d);
    } 
}

A. 38 43

B. 39 44

C. 295 300

D. 295.04 300

Answer: Option B


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

Join The Discussion

Related Questions on Data Types and Variables