I have two statements in java:
System.out.println(2 * (5 / 2 + 5 / 2 ));
This generate the output 8
but again in next line:
System.out.println(2 * 5 / 2 + 2 * 5 / 2 );
This generate the output 10
.
now my confusion is why it generates different output
please someone describe it. thanks