社区
Java SE
帖子详情
java有没有类似js的eval功能
fuwang
2006-08-03 03:50:17
比如
void isTrue(String booleanString){
return eval(booleanString);
}
类似于这个eval的功能如何实现?
...全文
398
8
打赏
收藏
java有没有类似js的eval功能
比如 void isTrue(String booleanString){ return eval(booleanString); } 类似于这个eval的功能如何实现?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
8 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
hbwhwang
2006-08-03
打赏
举报
回复
很遗憾,没有!
fuwang
2006-08-03
打赏
举报
回复
意思再明确一下
比如
void Boolean isTrue(String booleanString){
return eval(booleanString);
}
booleanString是一个表示布尔值的字符串,
比如"new Boolean(3>2)"或者"new Boolean("a".equals("b"))",
然后这样调用isTrue("new Boolean(3>2)")
如何解析这个传入的字符串得到一个Boolean值?
wanguanghai
2006-08-03
打赏
举报
回复
应该没有吧,不知道,up
will123
2006-08-03
打赏
举报
回复
不明白
year1937
2006-08-03
打赏
举报
回复
你是不是说这个?
try
{
Class.forName(booleanString).newInstance();
}
catch(Exception e)
{}
dreamover
2006-08-03
打赏
举报
回复
自己分析字符串
dreamover
2006-08-03
打赏
举报
回复
没有
yingge
2006-08-03
打赏
举报
回复
不明白你的意思。。
华为荣耀recovery1.0
源码链接: https://pan.quark.cn/s/a4b39357ea24 This directory contains a script ('makefsdata') to create C code suitable for httpd for given html pages (or other files) in a directory. There is also a plain C console application doing the same and extended a bit. Usage: htmlgen [targetdir] [-s] [-i]s targetdir: relative or absolute path to files to convert switch -s: toggle processing of subdirectories (default is on) switch -e: exclude HTTP header from file (header is created at runtime, default is on) switch -11: include HTTP 1.1 header (1.0 is default) if targetdir not specified, makefsdata will attempt to process files in subdirectory 'fs'.
光纤耦合器Matlab模拟.rar
光纤耦合器Matlab模拟.rar
ModbusDoctor软件
官网下载地址:需墙:https://www.kscada.com/modbusdoctor.html 使用非常简单,并且免费、免安装 Modbus Doctor(强烈推荐) 下载地址:搜索 “Modbus Doctor” 官网或 GitHub 界面现代化,支持中文,操作和 Modbus Poll 很像
Java SE
62,621
社区成员
307,257
社区内容
发帖
与我相关
我的任务
Java SE
Java 2 Standard Edition
复制链接
扫一扫
分享
社区描述
Java 2 Standard Edition
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章