摘要:1:单利模式:publicclassSingleton {privatestaticSingletonuniqueInstance=null;privateSingleton() {// Exists only to defeat instantiation. }publicstaticSingleton getInstance() {if(uniqueInstance==null) {uniqueInstance=newSingleton(); }returnuniqueInstance; }// Other methods...}代理模式(静态):package com; /** * 车站
阅读全文
摘要:工厂模式: /*** @author Rollen-Holt 设计模式之 工厂模式*/interface fruit{public abstract void eat();}class Apple implements fruit{public void eat(){System.out.print...
阅读全文
摘要:反射详解链接:http://www.cnblogs.com/rollenholt/archive/2011/09/02/2163758.html开始方法 Class cl = Class.forName(mc.getClass().getName());Java Annotation 详解http://www.cnblogs.com/phoebus0501/archive/2011/02/21/1960077.htmlgetFields()获得某个类的所有的公共(public)的字段,包括父类。getDeclaredFields()获得某个类的所有申明的字段,即包括public、private
阅读全文
摘要:第一种:String str=path; /** * 读取图片属性:旋转的角度 * * @param path * 图片绝对路径 * @return degree旋转的角度 */ private void readPictureDegree(String filePath) { int angle = 0; try { ExifInterface exifInterface = new ExifInterface(filePath); int orientation = exifInterface.getAttributeInt( ...
阅读全文
摘要:标题: 标题(Heading)是通过 - 等标签进行定义的。 定义最大的标题。 定义最小的标题。段落: HTML 文本格式化:HTML样式:结合css: 外部访问方式: 定义资源引用。 #gg{ color: #710909; font-weight: bold; font-size: 50...
阅读全文