Define S = [s,n] as the string S which consists of n connected strings s. For example, ["abc", 3] ="abcabcabc". On the other hand, we define that string s1 can be obtained from string s2 if we can remove some characters from s2 such th…
Define S = [s,n] as the string S which consists of n connected strings s. For example, ["abc", 3] ="abcabcabc". On the other hand, we define that string s1 can be obtained from string s2 if we can remove some characters from s2 such th…
201521123038 <Java程序设计> 第七周学习总结 1. 本周学习总结 2. 书面作业 1.ArrayList代码分析 1.1 解释ArrayList的contains源代码 contains: public boolean contains(Object o) { return indexOf(o) >= 0; } indexof: public int indexOf(Object o) { if (o == null) { for (int i = 0; i <…
20175209 <Java程序设计>第七周学习总结 一.教材知识点总结 第八章 常用类和实用类 1.String类 构造String对象 常量对象:""中的字符序列,存放在常量池中,运行期间不会被改变 创建对象:String s = new String("we are students")或者用已创建的String对象创建新的String对象String tom = new String(s) 对象中存放的是引用,实体相同的两个变量在比较时要看引用是…