Enter a random number between 1 and 10. If you guess the lucky number, you win a prize!
The above app demonstrates how a computer program has to handle user input.
What happens if you enter your name into the input box? Does the program crash? Or can it handle this awkward situation?
The program utilises exception (error) handling.
Click the starter activity to explore this concept in Java.
integratedsyntax development environment machine code translate type errorcompile