b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

struts2的ognl表达式_el表达式转数组_ognl表达式和el表达式(4)

电脑杂谈  发布时间:2017-02-12 08:02:22  来源:网络整理

expression.

■ Boolean - true and false

■ Integer - As defined by the IntegerLiteral construct in Section 1.19

■ Floating point - As defined by the FloatingPointLiteral construct in

Section 1.19

■ String - With single and double quotes - " is escaped as \", ' is escaped as \',

and \ is escaped as \\. Quotes only need to be escaped in a string value enclosed

in the same type of quote

■ Null - null

也规定了操作符的运算规则,如+ - *:

Java代码 1.3 Literals

There are literals for boolean, integer, floating point, string, and null in an eval-expression.

■ Boolean - true and false

■ Integer - As defined by the IntegerLiteral construct in Section 1.19

■ Floating point - As defined by the FloatingPointLiteral construct in

Section 1.19

■ String - With single and double quotes - " is escaped as \", ' is escaped as \',and \ is escaped as \\. Quotes only need to be escaped in a string value enclosed in the same type of quote

■ Null - null

■ If operator is -, return A.subtract(B)

■ If operator is *, return A.multiply(B)

■ If A or B is a Float, Double,or String containing ., e,or E:

■ If A or B is BigInteger, coerce both A and B to BigDecimal and apply operator.

■ Otherwise, coerce both A and B to Double and apply operator

■ If A or B is BigInteger, coerce both to BigInteger and then:

■ If operator is +, return A.add(B)

■ If operator is -, return A.subtract(B)

■ If operator is *, return A.multiply(B)

■ Otherwise coerce both A and B to Long and apply operator

■ If operator results in exception, error

如Integer型,直接交给前边介绍的IntegerLiteral。ognl表达式和el表达式

即规范中其实已经规范了这些,但是就像java里的一些东西,虽然规范规定了(如排序时 很有时候使用 return a-b; 如果a是负数则可能溢出),但是还是很容易出错。


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-31947-4.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    热点图片
    拼命载入中...