Java Practise
郭龙_Jack
这个作者很懒,什么都没留下…
展开
-
Reading and writing binary files
http://www.javapractices.com/topic/TopicAction.do?Id=245In JDK 7, the most important classes for binary files are:Paths and Path - file locations/names, but not their content.Files - operation转载 2014-02-23 22:50:17 · 653 阅读 · 0 评论 -
Iterate without an index
http://www.javapractices.com/topic/TopicAction.do?Id=88Many programmers have a strong preference for using a for-each loop or an Iterator instead of a for-loop.The traditional for-loop alway转载 2014-02-23 23:31:26 · 510 阅读 · 0 评论 -
Reading and writing Serializable objects
http://www.javapractices.com/topic/TopicAction.do?Id=57Reading and writing Serializable objects is very similar to reading and writing text:it' almost always a good idea to use buffering (defa转载 2014-02-23 23:00:06 · 601 阅读 · 0 评论 -
Two ways of using Iterator
http://www.javapractices.com/topic/TopicAction.do?Id=125When the for-each loop is not available, and an explicit Iterator is needed, then iteration over a collection may be done with a while loo转载 2014-02-23 23:41:28 · 517 阅读 · 0 评论 -
Encapsulate collections
http://www.javapractices.com/topic/TopicAction.do?Id=173In general, Collections are not immutable objects. As such, one must often exercise care that collection fields are not unintentionally ex转载 2014-02-23 23:28:29 · 592 阅读 · 0 评论 -
Choosing the right Collection
http://www.javapractices.com/topic/TopicAction.do?Id=65Here's a guide for selecting the proper implementation of a Set, List, or Map. It was compiled for Java 1.4. Many additions have been made转载 2014-02-23 23:18:24 · 567 阅读 · 0 评论 -
Reading and writing text files
http://www.javapractices.com/topic/TopicAction.do?Id=42In JDK 7, the most important classes for text files are:Paths and Path - file locations/names, but not their content.Files - operatio转载 2014-02-23 23:03:52 · 635 阅读 · 0 评论 -
Use standard Collections
In the Collections Framework, there are many implementation classes to choose from. Most of the time, one of these "primary implementations" is the appropriate choiceArrayList, for an implemen转载 2014-02-23 23:55:08 · 494 阅读 · 0 评论 -
Use for-each liberally
http://www.javapractices.com/topic/TopicAction.do?Id=196The for-each loop is used with both collections and arrays. It's intended to simplify the most common form of iteration, where the itera转载 2014-02-23 23:47:47 · 578 阅读 · 0 评论 -
Copy a file
http://www.javapractices.com/topic/TopicAction.do?Id=246In JDK 7+, copying a file is a simple operation, involving a single call to File.copy.Example import java.io.IOException;import j转载 2014-02-23 22:46:50 · 600 阅读 · 0 评论 -
Use interface references to Collections
http://www.javapractices.com/topic/TopicAction.do?Id=26In general, references to objects should be as generic as possible. The user of such a reference will be protected from possible changes to转载 2014-02-23 23:49:50 · 584 阅读 · 0 评论 -
Prefer Collections over older classes
http://www.javapractices.com/topic/TopicAction.do?Id=39Most programmers prefer the Java Collections Framework to arrays, Vector, and Hashtable, for the following reasons:the intent of the转载 2014-02-23 23:36:08 · 618 阅读 · 0 评论 -
敏捷开发中高质量 Java 代码开发实践
http://www.ibm.com/developerworks/cn/java/j-lo-agile/敏捷开发中高质量 Java 代码开发实践本文将介绍在敏捷开发过程中如何通过采取一系列的步骤来保证和提高整个项目的代码质量,阐述了每一步可以利用的工具和最佳实践,从而使开发过程更加规范化,成就高质量的代码。4 评论:王转载 2015-01-22 23:34:54 · 946 阅读 · 0 评论