Quantcast
Channel: Java Practices
Browsing all 31 articles
Browse latest View live

Beware of Byte Order Marks

New topic.

View Article



Structs are occasionally useful

New topic.

View Article

Uncaught exception handler

The old JDK 1.4 style of implementation has been removed.

View Article

Construct Object using class name

Improved and clarified.

View Article

Wisdom, not rules

New topic.

View Article


Use Version Control tools

Updated to include remarks on Subversion.

View Article

Wrapper (Decorator)

New topic.

View Article

Recursive file listing

Added code example appropriate to JDK 7.

View Article


Consider data layer tools

Emphasize disadvantages of object-relational mapping.

View Article


Reading and writing text files

Added code example appropriate to JDK 7.

View Article

Copy a file

Added code example appropriate to JDK 7.

View Article

Recovering resources

Added note on try-with-resources.

View Article

Modernize old code

Added remarks on JDK 7.

View Article


Finally and catch

Added note on try-with-resources.

View Article

Nest classes with care

New topic. Prefer static nested classes if possible. Enumerates the various kinds of nested classes.

View Article


Open file in native directory

New topic. Open and access a file residing in the same directory as the class that uses it.

View Article

Measure application performance

Now mentions the new Java Mission Control tool, that comes bundled with the JDK (7u40).

View Article


Don't use tab characters

Added a note about negative indentation. Recommended indentation of 2-4 spaces. Added quote from Code Complete.

View Article

Use @Override liberally

Clarified how @Override grew to be applied to interface methods as well, as of JDK 7.

View Article

Don't pass 'this' out of a constructor

Clarified the terms, and clarified the three ways a 'this' reference can be used in a constructor. (Thank you Andrew Sackett.)

View Article
Browsing all 31 articles
Browse latest View live




Latest Images