Here you can find the source of plural(int count, String word, String ending)
Parameter | Description |
---|---|
count | a parameter |
word | a parameter |
ending | a parameter |
public static String plural(int count, String word, String ending)
//package com.java2s; //License from project: Open Source License public class Main { /**//from ww w . ja v a 2 s. com * Return plural word if count is bigger than one * * @param count * @param word * @param ending * @return */ public static String plural(int count, String word, String ending) { return count == 1 ? word : word + ending; } }