- 博客(4)
- 收藏
- 关注
原创 java 优化
1.尽量不要在循环内new对象,尽量减少对变量的重复计算。尽量不要在循环体内用try catch,应把Try/Catch放在循环最外层。final int len=9800; String[] arr=new String[len]; Random r=new Random();//写到循环外 for(int i=0;i
2016-09-27 15:41:14 173
原创 java原子操作和同步块的比较
import java.util.concurrent.atomic.AtomicInteger;/** * Created by zsm on 16-9-23. */public class AtomicInte extends Thread{ final static AtomicInteger value = new AtomicInteger(0 ); final static int t
2016-09-23 21:04:25 377
原创 idea不支持泛型 请使用 -source 5 或更高版本以启用泛型
今天新安装了idea,但是很不顺利,idea出现了异常,不支持泛型:source 1.3 中不支持泛型(请使用 -source 5 或更高版本以启用泛型解决方法如下:file--project structure ----project ----project language leverl 选择更高版本
2016-09-16 11:56:19 8180 1
原创 Java 7所有参数
Behavioral OptionsJVM OptionsYou can send an option to the JVM to get a list of all the flags and their default values usingjava -XX:+PrintFlagsFinal. Note that you can also supply options to se
2016-09-08 11:46:53 339
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人