Reversing a String and learning Singleton