What should be printed?
int result = 0;
result = result + (null != null ? 3 : 2);
result += (1 & 2) == 1 ? 2 : 3;
result += 1e5;
result += 1e2;
System.out.println(result);
For further actions, you may consider blocking this person and/or reporting abuse
Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.
ashu-commits -
DPC -
Bala Madhusoodhanan -
Calvince Moth -
Top comments (4)
10106.0
, I think. Because:No, you made a little mistake,
null == null
always true, thereforenull != null
should always be false.Ah! You're right.
100105
, then. (I also mistakenly added a.0
and lost a power of 10.)By the way, if you put
java
after the backticks on your code box, it applies Java syntax highlighting!This:
will produce
...while this:
will produce
This works with JavaScript (
js
), Python (python
), and lots of other languages, as well.Wow, thank you! I didn't know it.
Some comments may only be visible to logged-in visitors. Sign in to view all comments.