-
·
Clean Code: Java Class Fields
Keeping your code clean is no easy task. Clean code allows your project to pass the test of time. It can be broken down into making your code simple to read, write, and understand. This post will explain how you can clean up your class fields to move towards a cleaner project. Code maintenance is…
-
·
[TUT] Easier / Quicker Generic Collection Creation
Sick of repeating your generics declaration?Sick of repeating your generics declaration? [java] List<SomeObject> listOfSomething = new ArrayList<SomeObject>(); Map<SomeKey, SomeObject> mapOfSomething = new HashMap<SomeKey, SomeObject>(); [/java] For a quick and easy way to create a collection of objects you can do the below. Create yourself a util class: [java] package com.blundell.util; import java.util.ArrayList; import java.util.HashMap; public…