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

ognl表达式和el表达式_ognl取值_jsel表达式和ognl(4)

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

{

return Long.valueOf(num0.longValue() + num1.longValue());

}

从这里我们可以看出其实现。ognl表达式和el表达式

而且其规范中都规定了具体字面量的东西:

写道

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

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

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。

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


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

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

    • 蔺利密
      蔺利密

      我就笑笑啦明显是针对新出的6s6sp来更新的那些以前的更新难免会出一些毛病喽

    • 王翼航
      王翼航

      使得多余的男性成为女性的消费品

    • 鲁魏公姬费
      鲁魏公姬费

      • 杨茜茜
        杨茜茜

        看来可以做的更好的

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