Java
春呜
123
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Java基本数据类型转化总结
(1)boolean类型不可以转换为其他的数据类型。(2)整形、字符型、浮点型的数据在混合运算中相互转化时,转化遵循如下规则:1)容量小的类型自动转化成容量大的类型,数据类型按照容量大小排序为: byte、short、char->int->long->foat->double byte、short、char之间不可以相互转化,他们三者在计算时,首先转化成int原创 2016-07-30 23:16:09 · 469 阅读 · 0 评论 -
获得Class对象的三种方式(来自java疯狂讲义)
(1)使用Class类的静态forName(String clazzName)静态方法,该方法需要传入字符串参数,该字符串参数的值是某个类的权限定类名(必须加完整的包名)。 代码如下: public class CreateJFrame{ public static void main(String[] args) throws Excep原创 2017-02-28 11:28:13 · 856 阅读 · 0 评论 -
HashMap报错:java.util.ConcurrentModificationException
HashMap是线程不安全的 ,那么为什么说它是线程不安全的呢? 首先来看一下官方API有关HashMap线程不安全的描述:Note that this implementation is not synchronized. If multiple threads access a hash map concurrently, and at least one of the原创 2017-02-22 15:37:41 · 9586 阅读 · 1 评论
分享