随笔分类 -  java

摘要://定一个静态方法,专门生成单个的号码 public static void getPhoneNum() { //给予真实的初始号段,号段是在百度上面查找的真实号段 String[] start = {"133", "149", "153", "173", "177", "180", "181", 阅读全文
posted @ 2022-06-27 17:52 wyuioahxvm 阅读(1) 评论(0) 推荐(0)
摘要:String jsonString = JSON.toJSONString(httpResponse.getData());UserGoldInfoResDto userGoldInfoResDto =JSON.parseObject(jsonString, UserGoldInfoResDto.c 阅读全文
posted @ 2022-06-21 11:10 wyuioahxvm 阅读(92) 评论(0) 推荐(0)
摘要:可以使用compareTo(Bigdecimal bigdecimal),传入“BigDecimal.ZERO”返回0表示等于0,返回1表示大于0,返回-1表示小于0: System.out.println("0-0="+new BigDecimal("0").compareTo(BigDecima 阅读全文
posted @ 2022-06-15 11:18 wyuioahxvm 阅读(5725) 评论(0) 推荐(0)
摘要:/** * 转换时间格式为xx小时xx分xx秒 * @param second xxxxx */public String changeTimeFormat(String second) { Integer seconds = Integer.valueOf(second); // 得到分钟数 In 阅读全文
posted @ 2022-06-15 10:45 wyuioahxvm 阅读(139) 评论(0) 推荐(0)
摘要:/** * 转换时间格式为xx分xx秒 入参毫秒 四舍五入 * @param millisecond xxxxx */public String changeTimeFormat(String millisecond) { if(StringUtils.isBlank(millisecond)){ 阅读全文
posted @ 2022-06-15 10:39 wyuioahxvm 阅读(133) 评论(0) 推荐(0)
摘要:BigDecimal percent =BigDecimal.valueOf(wosCourseVo.getLearnStuNum()*100).divide(BigDecimal.valueOf(wosCourseVo.getStudentsNum()), 0, BigDecimal.ROUND_ 阅读全文
posted @ 2022-05-29 21:12 wyuioahxvm 阅读(802) 评论(0) 推荐(0)
摘要:1.String转Double String ss = "3.141592653"; double value = Double.valueOf(ss.toString()); 阅读全文
posted @ 2019-12-30 21:23 wyuioahxvm 阅读(120) 评论(0) 推荐(0)
摘要:这次我们用到zxing首先介绍一下zxing,ZXing(“斑马线”)是一种开放源代码,多格式的1D / 2D条码图像处理库,以Java实现,并带有其他语言的端口。 Zxing可以实现使用手机的内置的摄像头完成条形码的扫描及解码,这是一个开源的项目 Git地址:https://github.com/ 阅读全文
posted @ 2019-11-27 16:07 wyuioahxvm 阅读(220) 评论(0) 推荐(0)
摘要:Long longValue=1111L;double doubleValue=longValue.doubleValue()/100;System.out.println(doubleValue); 阅读全文
posted @ 2019-11-26 09:55 wyuioahxvm 阅读(10486) 评论(3) 推荐(0)
摘要:不能被继承 原因: 因为String类有final修饰符,而final修饰的类是不能被继承的。 阅读全文
posted @ 2019-08-27 15:23 wyuioahxvm 阅读(451) 评论(0) 推荐(0)
摘要:java中8种基本数据类型:byte , short , int , long , float , double , char , boolean 代码测试: 转载自 https://blog.csdn.net/zhangyubishoulin/article/details/82423177 阅读全文
posted @ 2019-08-27 15:05 wyuioahxvm 阅读(960) 评论(0) 推荐(0)