Java tutorial
//package com.java2s; public class Main { private static void addUnits(StringBuilder stringBuilder, int value, String units) { stringBuilder.append(" "); if (value == 1) stringBuilder.append(units + " "); else stringBuilder.append(units + "s "); } }