What will be printed? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
- 1

What will be printed?

in this code, what will be printed if method() returns an error? try { print("hello"); method(); print("world"); } catch (errorMethod e) { print("universe error"); }

5th Oct 2017, 2:35 PM
Mark Tan
Mark Tan - avatar
2 Respuestas
+ 1
No output.
5th Oct 2017, 2:37 PM
AgentSmith
0
won't the error handling code be printed after hello if the error came from method()?
5th Oct 2017, 2:42 PM
Mark Tan
Mark Tan - avatar