首页 > 其他 > 详细

String 类

时间:2019-03-25 19:07:38      阅读:113      评论:0      收藏:0      [点我收藏+]

// 方便自己看,代码非常不规范,请勿参考.

http://www.runoob.com/java/java-string.html

 

 

  1. 创建:
    String s = “hello”;

     

  2. 字符串链接:
    string1.concat(string2);

     

  3. int indexOf(String str);
     返回指定子字符串在此字符串中第一次出现处的索引,没有索引返回-1.
  4. String substring (int beginIndex, int endIndex)

     

 

String 类

原文:https://www.cnblogs.com/Jessiezyr/p/10595614.html

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