![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java
Reeye_
abc
展开
-
Java 驼峰字符串转下划线连接
代码: @Test public void test8() { String str = "userLevelAndAge"; String res = String.join("_", Stream.of(str.replaceAll("([A-Z])", ",$1")原创 2017-12-21 18:36:10 · 1478 阅读 · 2 评论 -
[数组排序]奇数左边 偶数右边
问题:给定一个int数组要求排序, 排序完奇数在左边 偶数在右边规定: 1.最多只用一层循环 2.不创建新的数组/集合1. 自己写的: public static void main(String[] args) { int[] arr = new int[] {2, 1, 5, 4, 6, 3}; System.out.pri...原创 2018-08-09 17:42:06 · 2061 阅读 · 0 评论