首页 > 其他 > 详细

String 学习1(split valueof)

时间:2014-09-20 15:34:50      阅读:224      评论:0      收藏:0      [点我收藏+]

Strings are constant; their values cannot be changed after they are created

  String s1 = "Hello";
  String s2 = "Hello";
  System.out.println(s1==s2); //true
  
  String s3 = new String("Hello");
  String s4 = new String("Hello");
  
  System.out.println(s3 == s4); //false
  System.out.println(s3.equals(s4)); //true
  
  char [] a = {‘a‘,‘b‘,‘c‘ ,‘d‘};
  String s5 = new String(a);
  String s6 = new String(a,1,3);
  System.out.println(s5);
  System.out.println(s6); //bcd

public String[] split(String regex)

String 学习1(split valueof)

原文:http://www.cnblogs.com/oraclespace/p/3983290.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!