Titles are one of the most important and most forgotten things when doing edits.
By all means, if you can fix a title to match the question do so. And while you are there, fix the other things too (tags and body)... but don't forget to fix the title. If everything else is good in the body, fixing the title alone is a good improvement too.
All too often people answer the title without reading the question. The title is what people see first when looking at a question, its part of the indexing on Google. These are key reasons to fix it.
As to 'JAVA' (should be "Java" but that's a minor nit) - tags are not useful in titles ("Java: how to do matrixes"), but organically worded questions ("How to do matrix rotation in Java") are much more natural to read, search, and find.