Implementation of method inputPrompt in Class Util