文章列表
1.4.1. Problem
You want to automate the creation of toString( ) methods.1.4.2. Solution
Use the Commons Lang ReflectionToStringBuilder or ToStringBuilder and ToStringBuilder to create toString()
methods. The following code is an example of a toString( ) method, which uses a r ...
- 2009-08-15 14:19
- 浏览 1590
- 评论(0)
收藏一些链接,感觉写得挺不错
面向对象的设计原则一 开放-关闭原则
面向对象的设计原则二-单一职责原则
面向对象的设计原则三 - 接口隔离原则
面向对象的设计原则四 - 里氏代换原则
面向对象的设计原则五 - 依赖倒转原则
面向对象设计原则六 - 针对接口编程,而不是针对实现编程
面向对象设计原则七 - 组合优先于继承
- 2009-08-15 11:03
- 浏览 1095
- 评论(0)
Summary:
Immutable objects have a number of properties that
make working with them easier, including relaxed synchronization
requirements and the freedom to share and cache object references
without concern for data corruption. While immutability may not
necessarily make sense for all classes, ...
- 2009-08-15 00:32
- 浏览 710
- 评论(0)
Summary:
ConcurrentHashMap
, part of Doug Lea's util.concurrent
package, offers a higher degree of concurrency than Hashtable
or synchronizedMap
. In addition, it manages to avoid locking completely for most successful get()
operations, which results in excellent throughput in ...
- 2009-08-15 00:27
- 浏览 895
- 评论(0)
Summary:
In addition to many other useful concurrency building blocks, Doug Lea's util.concurrent
package contains high-performance, thread-safe implementations for workhorse collection types List
and Map
. This month, Brian Goetz shows you how many concurrent programs will benefit fr ...
- 2009-08-15 00:23
- 浏览 966
- 评论(0)
The benefits of garbage collection are indisputable -- increased
reliability, decoupling of memory management from class interface
design, and less developer time spent chasing memory management errors.
The well-known problems of dangling pointers and memory leaks simply do
not occur in Java prog ...
- 2009-08-15 00:04
- 浏览 784
- 评论(0)
In the early days of Java technology, allocating objects got a
pretty bad rap. There were lots of articles (including some by this
author) advising developers to avoid creating temporary objects
unnecessarily because allocation (and the corresponding
garbage-collection overhead) was expensive. Wh ...
- 2009-08-14 23:33
- 浏览 1129
- 评论(0)
Removing GC Synchronisation
Andy C. King
ak32@ukc.ac.uk
ACM No. 5256805
Computing Laboratory
University of Kent
Canterbury, Kent, CT2 7NF, UK
Richard Jones (Advisor)
R.E.Jones@ukc.ac.uk
<!-- Format
Problem and ...
- 2009-08-14 23:15
- 浏览 755
- 评论(0)
Table of Contents
1
Introduction
2
Generations
2.1
Performance Considerations
2.2
Measurement
3
Sizing the Generations
3.1
Total Heap
3.2
The Young Generation
3.2.1
Young Generation Guarantee
4
Types of Collectors
4.1When
to Us ...
- 2009-08-14 22:55
- 浏览 857
- 评论(0)
Summary:
Every Java object has a hashCode()
and an equals()
method. Many classes override the default implementations of these
methods to provide a higher degree of semantic comparability between
object instances. In this installment of Java theory and practice
, Java developer Brian Goetz s ...
- 2009-08-14 22:08
- 浏览 744
- 评论(0)