- 博客(9)
- 收藏
- 关注
原创 JPA notes 1
Creating an EntityRegular Java classes are easily transformed into entities simply by annotating them. In fact, by adding a couple of annotations, virtually any class with a no-arg constructor ...
2013-05-09 12:52:14 199
原创 zt - 深入浅出JAVA多线程(1)-方法 JOIN
深入浅出JAVA多线程(1)-方法 JOINPosted on 2008-08-23 23:25 advincenting 阅读(10602) 评论(8) 编辑 收藏 所属分类: JAVA基础知识 对于Java开发人员,多线程应该是必须熟练应用的知识点,特别是开发基于Java语言的产品。本文将深入浅出的表述Java多线程的知识点,在后续的系列里将侧重于Java5由Doug L...
2011-09-16 13:50:28 74
原创 快速排序
[code="java"]package com.alzhang.chapter03; import java.util.Comparator; import java.util.Random; @SuppressWarnings("unchecked") public class QuickSort { public stat...
2011-03-09 13:18:17 75
原创 XML-RPC
[code="java"]package org.apache.xmlrpc.demo.webserver;import org.apache.xmlrpc.server.PropertyHandlerMapping;import org.apache.xmlrpc.server.XmlRpcServer;import org.apache.xmlrpc.server.XmlRpc...
2011-03-08 13:30:51 103
原创 Singleton pattern
Singleton: Ensure a class only has one instance and provide a global point of access to it.code implementation[code="java"]public class Singleton { private static Singleton uniqueInstance;...
2010-06-20 11:26:38 92
原创 factory pattern
let's say you have a pizza shop. you might end up writing some code like this:[code="java"]Pizza orderPizza() {Pizza pizza = new Pizza();pizza.prepare();pizza.bake();pizza.cut();pizza....
2010-06-06 08:53:31 84
原创 decorator pattern
Decorator Pattern: attaches additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.Meet the decorator pattern:...
2010-06-06 01:15:04 103
原创 observer pattern
Observer pattern: defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.oo principles: strive for loosel...
2010-06-04 23:14:44 107
原创 strategy pattern
The strategy pattern defines a family of algorithms, encapsulates each one, and makes them interchangeable. Strategy lets the algorithm vary independently from clients that use it.see SimUDuck app...
2010-06-04 13:07:30 108
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人