Welcome to the CSC Q&A, where you can get help (and share your knowledge) about computer science!

Method Help in the Lab.

+2 votes
My friend suggests me to change the name of the method in that messy class we had in the lab. My best effort is to change howbad to howBad, and Help to help ... Any suggestion?
asked Oct 10 in CSC 285 (F17) by Trung Le (Jayden) (2,256 points)

1 Answer

+2 votes

I would recommend trying to figure out what those methods actually do, and then naming the methods based on that. For example, if the howbad method counted the number of times you had a repeated word in a ArrayList, you would want to change the name of that method to something like countRepeatedWords() since howbad as a method name does not give any insight to what the method actually does.

answered Oct 10 by Lars Harvey (1,868 points)