Question:What will be the output of the program?
class Equals 
{
    public static void main(String [] args) 
    {
        int x = 100;
        double y = 100.1;
        boolean b = (x = y); /* Line 7 */
        System.out.println(b);
    }
}
 

A true 

B false 

C Compilation fails 

D An exception is thrown at runtime 

+ Answer
+ Explanation
+ Report
Total Preview: 1317

Copyright © 2024. Powered by Intellect Software Ltd