码迷,mamicode.com
首页 >  
搜索关键字:final    ( 9795个结果
用私有构造器或者枚举类型强化singleton属性——Effective Java 读书笔记
/** * 实现singleton的第二种方法,共有成员是个静态工厂方法。 * (第一种方法中公有静态成员是个final域,即直接使用private static final Singleton INSTANCE = new Singleton();) * @author 刘向峰 * */ public class Singleton { private static final...
分类:编程语言   时间:2015-02-13 16:40:49    阅读次数:194
【转】Java精确四则运算
/** * 由于Java的简单类型不能够精确的对浮点数进行运算,这个工具类提供精 确的浮点数运算,包括加减乘除和四舍五入。 */public class Arith { // 默认除法运算精度 private static final int DEF_DIV_SCALE = 10; // 这个...
分类:编程语言   时间:2015-02-13 16:28:07    阅读次数:168
重构笔记
先介绍代码技巧: 1. public abstract class SuperClass implements SomeInterface { // This is the implementation of the interface method // Note it's final so it can't be overridden public final...
分类:其他好文   时间:2015-02-13 13:27:10    阅读次数:203
兔子--Error generating final archive: Found duplicate file for APK: LICENSE
Error generating final archive: Found duplicate file for APK: LICENSE Origin 1: E:\work\e\libs\mockito-all-1.9.5.jar Origin 2: E:\work\e\libs\mockito-core-1.9.5-sources.jar 有重复的jar包...
分类:其他好文   时间:2015-02-13 09:24:05    阅读次数:542
启动应用程序的Activty多种方式
启动应用程序的Activity总共有三种方式,如下:1>通过包名得到将启动应用的入口Activity,然后给intent附上相应的属性即可.示例代码public static void startApp(final Context context, final String pkgname) {Pa...
分类:其他好文   时间:2015-02-12 19:48:27    阅读次数:144
android ProgressDialog 正在载...Loading...
1 final ProgressDialog pd = new ProgressDialog(mContext);2 pd.setMessage("正在加载...");3 pd.show();
分类:移动开发   时间:2015-02-11 20:38:10    阅读次数:153
Java Load Properties 文件,定义message信息
初始化Properties对象,load properties文件:private static final Properties MESSAGERESOURCES = new Properties();static { try { MESSAGERESOURCE...
分类:编程语言   时间:2015-02-11 20:27:57    阅读次数:120
Android log 方法
package test;public abstract class Logger { private static Class mLoggerClass = null; public static final boolean DBG = true; public static f...
分类:移动开发   时间:2015-02-11 18:20:03    阅读次数:211
hibernate之实体@onetomany和@manytoone双向注解(转)
下面是User类:@onetomany@Entity@Table(name="user")public class User implements Serializable{ private static final long serialVersionUID = 6177417450707...
分类:Web程序   时间:2015-02-11 18:17:53    阅读次数:151
Linux下安装性能测试负载机LG
系统:CentOS release 6.6 (Final) x86_64安装包:1、LRLG_00031.iso 【Load Generator Standalone (Linux 64-bit) Service Pack 11.52】下载地址:HP官网https://softwaresupport...
分类:系统相关   时间:2015-02-11 18:14:20    阅读次数:389
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!