上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 16 下一页
摘要: 单例对象(Singleton)是一种常用的设计模式。在Java应用中,单例对象能保证在一个JVM中,该对象只有一个实例存在。这样的模式有几个好处: 1、某些类创建比较频繁,对于一些大型的对象,这是一笔很大的系统开销。 2、省去了new操作符,降低了系统内存的使用频率,减轻GC压力。 3、有些类如交易 阅读全文
posted @ 2016-05-22 22:39 凌零聆 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 设计模式(Design Patterns) 设计模式(Design pattern)是一套被反复使用、多数人知晓的、经过分类编目的、代码设计经验的总结。使用设计模式是为了可重用代码、让代码更容易被他人理解、保证代码可靠性。 毫无疑问,设计模式于己于他人于系统都是多赢的,设计模式使代码编制真正工程化, 阅读全文
posted @ 2016-05-22 22:33 凌零聆 阅读(235) 评论(0) 推荐(0) 编辑
摘要: package a; public class Chongzai { private int i; private int j; private int k; int m; public int getI() { return i; } public void setI(int i) { this. 阅读全文
posted @ 2016-05-20 21:04 凌零聆 阅读(658) 评论(0) 推荐(0) 编辑
摘要: public class Point { private int x; private int y; public int getX() { return x; } public void setX(int x) { this.x = x; } public int getY() { return 阅读全文
posted @ 2016-05-20 21:02 凌零聆 阅读(560) 评论(0) 推荐(0) 编辑
摘要: package a; public class Jidongche { private String chepaihao; private int chesu; private double zaizhong; public String getChepaihao() { return chepai 阅读全文
posted @ 2016-05-20 21:00 凌零聆 阅读(4074) 评论(0) 推荐(0) 编辑
摘要: package a; public class People { private String name,sex; private int age; private double height; public String getName() { return name; } public void 阅读全文
posted @ 2016-05-20 20:58 凌零聆 阅读(2564) 评论(0) 推荐(0) 编辑
摘要: package a; import java.nio.charset.MalformedInputException; public class Sanjiaoxing { private double a,b,c; // public Sanjiaoxing(double a, double b, 阅读全文
posted @ 2016-05-20 20:56 凌零聆 阅读(1316) 评论(0) 推荐(0) 编辑
摘要: package lianxi; public class Yanghuisanjiao { public static void main(String[] args) { int[][] ary =new int[10][10]; for (int i = 0; i < 10; i++) { fo 阅读全文
posted @ 2016-05-20 20:53 凌零聆 阅读(216) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 16 下一页