Java – shorten method / variable names?

Whether using long is considered a bad style, but descriptive method names such as "adjacetlocationsbystate()" if so, it's best to shorten it to something similar to "adjlocbystate". It must be shorter, but it's not very readable in my opinion

Solution

Don't make me think

When I read your code, if I have to stop and think about the meaning of the method name, it usually means that the method name is wrong When adding useful context to a method, a longer method name is preferable

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>