When you need to cast an expression value to the required type the SmartType code completion will help you. For example, type
String s = (<caret is here>
and press &shortcut:SmartTypeCompletion; to see what happens.