简单说,就是s为true(这四个字母大小写任意)时,返回值为true,否则为false

 public class one {

     public static void main(String[] args) {
Boolean b1, b2; // create 2 String's and assign values
String s1 = null;
String s2 = "truE"; /**
* static method is called using class name
* assign result of valueOf method on s1, s2 to b1, b2
*/
b1 = Boolean.valueOf(s1);
b2 = Boolean.valueOf(s2); System.out.println(b1);
System.out.println(b2);
String str1 = "Boolean instance of string " + s1 + " is " + b1;
String str2 = "Boolean instance of string " + s2 + " is " + b2; // print b1, b2 values
System.out.println( str1 );
System.out.println( str2 );
}
}

执行结果为:

最新文章

  1. CSS常见居中讨论
  2. hdfs shell 命令以及原理
  3. 【SharePoint学习笔记】第3章 SharePoint列表新特性以及数据访问
  4. Python 之 【re模块的正则表达式学习】
  5. 安装SQL Server 2005
  6. Linux系统中为php添加pcntl扩展的方法
  7. css3实现一个div设置多张背景图片及background-image属性
  8. C语言函数qsort的使用方法
  9. go结构体方法
  10. EL表达式与标签库
  11. (15)Python时间
  12. centos 安装 FLEXPART
  13. js保存,获取,删除cookie的操作
  14. C++动态(显式)调用 C++ dll
  15. pandas read_csv 读取中文列标题文件报错
  16. Springboot_StringRedisTemplate配置
  17. JavaScrip总体
  18. 微信小程序绑定数据(微信小程序交流群:604788754)
  19. 微信小程序 功能函数 获取验证码*
  20. Postgresql HStore 插件试用小结

热门文章

  1. pymongo的安装和使用
  2. 解析oracle对select加锁的方法以及锁的查询 转
  3. 串行通讯协议--起止式异步通讯协议(UART)
  4. stateless 无状态组件
  5. 杂记(那些我还容易混淆的c和c++知识)
  6. DecimalFormat的使用
  7. 【腾讯敏捷转型No.6】如何打造称手的敏捷工具
  8. [iOS]AVSpeechSynthesizer语音合成
  9. nodejs( koa2 )配置 browserHistory
  10. python实现用户登录问候