- 博客(3)
- 收藏
- 关注
原创 @JSONField的用法
主要用在JSON格式和JAVA对象之间进行传递的时候有很大的用处。由于JSON中的key与bean中的属性不能匹配,因此在转换过程中出现了部分属性为null的情况。如下:package test;import com.alibaba.fastjson.JSON;public class JSONFIELD { public static void main(String[] args) { ...
2018-06-19 19:52:48 2860 1
转载 Array.asList()数组转list时需要注意的几点
Array.asList()数组转list,很多已经写过需要避免的陷阱,参见:https://blog.csdn.net/chenleixing/article/details/43775127。int[] i={11,22,33}; List intList=Arrays.asList(i); //intList中就有一个Integer数组类型的对象,整个数组作为一个元素存进去的 为什么是...
2018-06-14 21:52:26 313
转载 No enclosing instance of type Test is accessible.报错原因
今天写代码的时候遇到了一个问题,main方法中创建内部类的实例时,编译阶段出现错误,查看错误描述:No enclosing instance of type Test is accessible. Must qualify the allocation with an enclosing instance of type Test (e.g. x.new A() where x is an ins...
2018-06-14 21:22:10 593
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人