If you have a collection of something, is the something writen in plural? [closed]

Solution 1:

You are correct that the plural is used in phrases such as "a list of users". However, your variable-names copy a different sort of phrase in English. This is where a noun (the head noun) is modified by a noun coming before the head noun. In this case the modifier is generally in the singular(1). Thus we would write "user list", and thus the variable-name would be better as userList.

(1) There are exceptions, such as "jeans pocket", but in those cases the modifier is a noun which is not normally used in the singular. Your examples are not of this exceptional type.