About Peter Lawrey
List/Grid Author Archives Subscribe to the RSS feed of Peter Lawrey

Java and Memory Leaks
Overview The term “memory leak” is used in Java in a manner which is different to how it is used in other languages. What does a “memory leak” mean in general ...

How to get C like performance in Java
Overview Java has many areas which can be slow. However for every problem there is a solution. Many solutions/hacks require working around Java’s protections but if you need low ...

Incorrect Core Java Interview Answers
Overview On the internet, Java interview questions and answers get copied from one web site to another. This can mean that an incorrect or out of date answer might never be corrected. ...

Java Secret: Using an enum to build a State machine
Overview The enum in Java is more powerful than many other languages which can lead to surprising uses. In this article, I outline some the individual features of enum in Java, and ...

Low GC in Java: Use primitives instead of wrappers
Overview There are two good reason to use primitives instead of wrappers where possible.Clarity. By using a primitive, you are making it clear that a null value is not appropriate. Performance. ...



