Skip to content

Commit df4c8a7

Browse files
author
zhangzhen
committed
test
1 parent 90ccc5c commit df4c8a7

2 files changed

Lines changed: 21 additions & 14 deletions

File tree

src/main/java/org/neil/util/StringUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
package org.neil.util;/** * @author neil * @date 2018/10/26 */public class StringUtil { /** * 替换字符串中成对的中括号及其之间的内容 * @param */ public static void replaceString(String errorMsg) { String regex = "\\[.*?\\]";// errorMsg.replaceAll(regex,""); } public static void main(String[] args) { String s = "订单[E20180720091302082300009]处于退款申请中, 不允许发货相关操作,";// "订单商品[1,444,307,412,760,135,635]已经发过货了, 不能重复发货"; String regex = "\\[.*?\\]";// s = StringUtils.replaceAll(s,regex,""); System.out.println(s.replaceAll(regex,"")); }}
1+
package org.neil.util;/** * @author neil * @date 2018/10/26 */public class StringUtil { /** * 替换字符串中成对的中括号及其之间的内容 * @param */ public static void replaceString(String errorMsg) { String regex = "\\[.*?\\]";// errorMsg.replaceAll(regex,""); } public static void main(String[] args) { String s = "订单[E20180720091302082300009]处于退款申请中, 不允许发货相关操作,";// "订单商品[1,444,307,412,760,135,635]已经发过货了, 不能重复发货"; String regex = "\\[.*?\\]";// s = StringUtils.replaceAll(s,regex,""); System.out.println(s.replaceAll(regex,"")); }}

src/main/java/org/neil/util/Test2.java

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
package org.neil.util;
22

3-
import java.util.HashMap;
4-
import java.util.Map;
5-
63
/**
74
* @author neil
85
* @date 2018/8/9
@@ -32,17 +29,27 @@ public static void main(String[] args) {
3229
// oldlist1.retainAll(newlist2);
3330
//
3431
// System.out.println(111);
35-
Map<Key,Integer> map = new HashMap<>();
36-
for (int i = 0; i < 2; i++) {
37-
for (int j = 0; j < 50; j++) {
38-
Key key = new Key(i);
39-
key.setValue(j);
40-
Integer oldValue = map.put(key, j);
41-
System.out.println(oldValue);
32+
// Map<Key,Integer> map = new HashMap<>();
33+
// for (int i = 0; i < 2; i++) {
34+
// for (int j = 0; j < 50; j++) {
35+
// Key key = new Key(i);
36+
// key.setValue(j);
37+
// Integer oldValue = map.put(key, j);
38+
// System.out.println(oldValue);
39+
//
40+
// }
41+
// }
42+
// System.out.println(map);
4243

43-
}
44-
}
45-
System.out.println(map);
44+
45+
46+
int h =255;
47+
System.out.println(Integer.toBinaryString(h));
48+
49+
int i1 = h >>> 16;
50+
System.out.println(i1);
51+
int i = h ^ i1;
52+
System.out.println(i);
4653

4754

4855
}

0 commit comments

Comments
 (0)