学习笔记
balck_book
这个作者很懒,什么都没留下…
展开
-
String replace() and replaceAll() modify
1.the parameters of replace are char and CharSequence,which can support this substribution of characters,and also support the substribution of strings ; 2.the parameters of replaceAll is the rege翻译 2017-09-28 10:21:43 · 237 阅读 · 0 评论 -
java String 的equals方法
之前看过某篇博文,写了Integer 的 cache 其上下限-127 到 128 可以使用“==”,否则就需要使用.equals的方法判断是否相等。 今天,闲来无事,就看看String 的 Compare 方法。 不说话,先上代码 public boolean equals(Object anObject) { if (this == anObject) {原创 2017-10-17 10:45:06 · 196 阅读 · 0 评论 -
Java + Scanner + next
回忆一下以前学习的东西,发现许多东西豁然开朗。 public static void main(String[] args) { Scanner s = new Scanner(System.in); String str1 = s.nextLine();//home work String str2 = s.next();//work home System原创 2017-10-17 15:00:45 · 169 阅读 · 0 评论