Does java use BODMAS?

后端 未结 2 869
傲寒
傲寒 2021-01-28 06:34

At the moment, I\'m trying to make a calculator using the java programming language. However, I need to know whether or not java uses BODMAS so that I\'ll know whether to make a

2条回答
  •  执念已碎
    2021-01-28 06:54

    It's BODMAS not BOMDAS (division is before multiplication).

    Yes Java does, there is also precedence rules that it uses about operators not included in BODMAS too

    A full list can be found in the Java documentation here:

    http://docs.oracle.com/javase/tutorial/java/nutsandbolts/operators.html

提交回复
热议问题