5 years ago in Java Operators

what is the output of the program ?
class Equals 

{

public static void main(String [] args)

{

int x = 100;

double y = 100.1;

boolean b = (x = y);

System.out.println(b);

}

}

[A] true
[B] false
[C] Compilation fails
[D] An exception is thrown at run time
Loading...
Next Question

Overall Stats

Attempted 256
Correct 66
Incorrect 83
Viewed 107

Answers

Guest
Guest
nikunj jhala
nikunj jhala - 2 weeks ago

nikunj jhala from Mumbai, India is saying Compilation fails is correct answer

Umayal Nachiappan
Umayal Nachiappan - 4 weeks ago

Umayal Nachiappan from Chennai, India is saying false is correct answer

Vaibhav Bisht
Vaibhav Bisht - 1 month ago

Vaibhav Bisht from Dehradun, India is saying false is correct answer

Cos Sinus
Cos Sinus - 1 month ago

Cos Sinus from Casablanca, Morocco is saying false is correct answer

Awa Kone
Awa Kone - 1 month ago

Awa Kone from Berrechid, Morocco is saying false is correct answer

Related Questions

What is the order of precedence (highest to lowest) of following operators?
1. &
2. ^
3. ?:

  • [A] 1 -> 2 -> 3
  • [B] 2 -> 1 -> 3
  • [C] 3 -> 2 -> 1
  • [D] 2 -> 3 -> 1