Oracle interview question

java code for reverse the string and count accurance of each letter