本文共 594 字,大约阅读时间需要 1 分钟。
<jsp:useBean id="person" class="com.mr.bean.Person"/> ${person }<br><!-- 相当于request.getAttribute("person") --> 年龄:${person.age }<br> 性别:${person.sex }<br> 测试+:${1+2 }<br> 测试科学计数:${1.2E4+1.4 }<br> 测试减法:${3-1 }<br> 测试除法:${6/2 }<br> 测试取余:${5%2 }<br> 三目运算符:${1==2 ? 3 :4 }<br> 测试小于:${1<2 }<br> 多运算:${(10*10)!=100 }<br> 支持且或非的多个比较运算:${1!=2&&3!=4 }<br> 可以用于字符串的比较:${'hip'>'hit' }<br> 可以判断是否为null,字符串是否为空${empty person }<br>
输出:
com.mr.bean.Person@7593290c
年龄:11
性别:男
测试+:3
测试科学计数:12001.4
测试减法:2
测试除法:3.0
测试取余:1
三目运算符:4
测试小于:true
多运算:false
支持且或非的多个比较运算:true
可以用于字符串的比较:false
可以判断是否为null,字符串是否为空 false
转载地址:http://uvjqi.baihongyu.com/