开发者

Collection naming convention

how should I name array that holds widths of columns? I would use:

int[] columnsWidths;

but I saw in many places names like:

columnWidths

or

colWidths

Of course "widths of colum开发者_如何学Cns" is only an example.

Moreover, I think there is also another case, when 2 words are not 2 separate words, but create some kind of name, e.g.

class TableView

How in this case variable's name should look like?

TableView[] tableViews;

or

TableView[] tablesViews;


Read Code Complete. But there is no right or wrong answer -- choose what suits you and your colleagues and be consistent.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜