会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
滔滔江水连绵不绝
博客园
首页
新随笔
联系
管理
订阅
2022年1月19日
if判断条件过多,利用Map,让代码表达更清晰
摘要: int a = 1; if(a ==1 || a == 3 || a == 4 || a == 8 || a == 11){ } Map<Integer,Boolean> map = new HashMap(); map.put( 1, true); map.put( 3, true); map.p
阅读全文
posted @ 2022-01-19 17:21 滔滔江水连绵不绝
阅读(282)
评论(0)
推荐(0)
2021年10月29日
MySQL中IN关键字应用,可以多字段运用
摘要: SELECT * FROM table_name WHERE ( field1,field2,field3... ) IN ( '1' , 1 ,'ONE'... ) ; 组合索引的绝妙搭配!!!
阅读全文
posted @ 2021-10-29 19:04 滔滔江水连绵不绝
阅读(311)
评论(0)
推荐(0)
2021年10月26日
1, 1, 2, 3, 5, 8, 13, 21, 34......获取第N位的值,算法的递归解决
摘要: //静态的计算次数;private static int start = 0; //main方法public static void main(String[] args) { System.out.println(test(9));}//测试方法public static int test(int
阅读全文
posted @ 2021-10-26 09:54 滔滔江水连绵不绝
阅读(464)
评论(0)
推荐(0)
BigDecimal数据类型的使用和小数点精度判断
摘要: //String类型确保小数精度BigDecimal bigDecimal = new BigDecimal("123.123");//split(String regex)放入的是正则表达,"."会全部剔除,需要"\\."String[] split = bigDecimal.toString()
阅读全文
posted @ 2021-10-26 09:34 滔滔江水连绵不绝
阅读(621)
评论(0)
推荐(0)
2021年2月3日
^符号的简单数据加密
摘要: String content="犹如滔滔江水连绵不绝";String key="?+vM8s84mH@/";byte[] contArray = content.getBytes();int length = contArray.length;byte[] keyArray = key.getByt
阅读全文
posted @ 2021-02-03 18:58 滔滔江水连绵不绝
阅读(150)
评论(0)
推荐(0)
公告