Thursday 20 October 2016

method naming standards

method naming standards 

  1. method name should be noun.
  2. method represent a group of statements which performs action.
  3. If method name contains one word then first letter starts with lower case letter.
  4. If method name contains more than one word then first letter starts with lower case letter, remaining words starts with upper case letter.
    1. Tip : Should not give space between the words while naming to method.
Examples :
Pre-defined method names:
    • char()
    • charAt()
    • toString()
User defined method names:
    • first()
    • accountDetails()
Thanks for your time.
Nireekshan