ServiceNow interview question

1. Reverse a string. Reverse all words from a string 2. Find smallest factors of a number 3. Exception handling in Java, what would be the output of throwing exceptions