Math, asked by nishushandilya4502, 1 year ago

What will be the output of the following 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); }}?

Answers

Answered by siddhartharao77
0
O/P: Compilation error.


The code should be modified as :


     class equals
      {
     public static void main(String [] args)
      {
        int x = 100;

        double y = 100.1;

         boolean b = (x == y); 

      System.out.println(b);
    }
}
Similar questions