Java

Java并发容器——ConcurrentSkipListMap和ConcurrentHashMap

原文:http://www.cnblogs.com/ygj0930/p/6543901.html  一:ConcurrentSkipListMap          TreeMap使用红黑树按照key...

Caused by: java.lang.NumberFormatException: For input string: "18446744073709551615"

问题:Causedby:java.lang.NumberFormatException:Forinputstring:"18446744073709551615"原因:18446744073709551615 --有20位,而long类型的最大长度是:19位:9223372036854775807long类型...

dnsjava usage

linuxdig命令使用方法https://www.imooc.com/article/26971?block_id=tuijian_wz https://jimwayne.blogspot.com/2012/08/java-dnsjava-dns-query.htmlhttp://dnsjava.orght...
代码星球·2020-06-02

Caused by: java.lang.ClassNotFoundException: Didn't find class "io.grpc.helloworldexample.HelloworldActivity" on path: DexPathList

FAQ: Androidapp编译好后安装到手机,运行时闪退,报如下错误:java.lang.RuntimeException:UnabletoinstantiateactivityComponentInfo{io.grpc.helloworldexample/io.grpc.helloworldexampl...

JavaBean toString()

JavaBeantoString方式https://www.cnblogs.com/thiaoqueen/p/7086195.html//方法一:自动生成@OverridepublicStringtoString(){return"ReportDataQo[eventCode="+eventCode+",reportD...
代码星球·2020-06-02

java 解析域名得到host

//形如https://www.baidu.com或www.baidu.com,判断这两种情况,并解析前者去掉http头,传入domainhost//方案1:正则表达式+URI解析方法importjava.io.IOException;importjava.net.URI;importjava.net.URL;impo...

Spring Cloud、Spring Boot与Docker 学习资料汇总

使用SpringCloud与Docker实战微服务https://gitee.com/itmuch/spring-cloud-bookhttps://eacdy.gitbooks.io/spring-cloud-book/content/配套代码:http://git.oschina.net/itmuch/spring...

Java反射机制

Java--浅入Java反射机制http://www.cnblogs.com/wjtaigwh/p/6640748.html API中给我们提供了一下方法getName():获得类的完整名字。getFields():获得类的public类型的属性。getDeclaredFields():获得类的所有属性。ge...
代码星球·2020-06-02

java判断给定路径或URL下的文件或文件夹是否存在?

if(file.exists()){来判断这是不是一个文件。file.isDirectory()来判断这是不是一个文件夹。1.FiletestFile=newFile(testFilePath);if(!testFile.exists()){testFile.mkdirs();System.out.println("测...

Android studio 运行java程序

Androidstudio运行java程序https://www.cnblogs.com/lgfrank/p/8059156.html步骤1:File—–>new—–>newModule…然后弹出一个框在moremodule里面选择javaLib...

java / android int类型如何判空?

/**TextUtils.isEmpty()方法的实现*Returnstrueifthestringisnullor0-length.*@paramstrthestringtobeexamined*@returntrueifstrisnullorzerolength*/publicstaticbooleanisEmpt...

JAVA代码设置selector不同状态下的背景

Selector设置button点击效果(详细)以及常见问题https://www.jianshu.com/p/a0ddba6d7969Android代码动态设置TextView的背景、颜色Selectorhttps://www.aliyun.com/jiaocheng/33771.htmlJAVA代码设置select...

Java Timer, TimerTask, Timer.Schedule

schedule的意思(时间表、进度表)timer.schedule(newTimerTask(){voidrun()},0,60*60*1000);timer.schedule(newMyTask(event.getServletContext()),0,60*60*1000);第一个参数"newMyTask(eve...

Kotlin 喧嚣过后,谈谈 Java 程序员未来的出路

Java的生态环境开放、自由,在Sun/Oracle、Google、Apache、Eclipse基金会等各大厂商,还有技术大牛的共同努力下,Java的生态圈异常繁荣,各种优秀的开源框架层出不穷。SpringBootSpringBoot是Pivotal团队推出的一个支持快速开发的框架,伴随Spring4.0而生,继承了S...

阿里巴巴 Java 开发手册评述

http://blog.jobbole.com/110427阿里巴巴Java开发手册(终极版)https://pan.baidu.com/s/1c1UQM7Q阿里巴巴Java开发规约插件p3cGitHub:https://github.com/alibaba/p3cAlibabaJavaCodingGuidelines...