Often a user posts a question with a title stating what he or she attempts to do, and a question involving some code. In many cases, the problem why this code doesn't work is caused by some part of the code which is not at all specific to the kind of problem the user tried to solve in the first place.
Should the question title be edited to match the actual cause of the problem? If it is not, then other users having the same core problem might have a harder time finding it. If it should be edited, then who should edit it? The OP editing his or her own question is certainly all right, but would it be all right for the one who found the error to edit the title?
To give you an example:
This question is currently titled “How do I call main method of one class inside another class?” but the actual problem was a misuse of the List.toArray()
method. There is nothing in that title suggesting that it might be of interest to people experiencing a ClassCastException
after calling a toArray
method. Would it be acceptable to rename the title to “ClassCastException casting result of toArray call to other array type” or similar?