Java是否使用BODMAS? [英] Does java use BODMAS?

查看:30
本文介绍了Java是否使用BODMAS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此刻,我正在尝试使用Java编程语言制作一个计算器.但是,我需要知道java是否使用BODMAS,这样我才能知道是制作实现BODMAS的算法还是继续制作计算器.Java是否使用BODMAS?

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 an algorithm that implements BODMAS or continue making the calculator. Does java use BODMAS?

推荐答案

它是BODMAS而不是BOMDAS(除法是在乘法之前).

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

是的,Java确实也有关于BODMAS中不包含的运算符的优先级规则.

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

完整的列表可以在Java文档中找到:

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

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

这篇关于Java是否使用BODMAS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆