Exception handling for int variables

  • Thread starter Thread starter spaghetti3451
  • Start date Start date
  • Tags Tags
    Variables
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 1K views
spaghetti3451
Messages
1,311
Reaction score
31

Homework Statement



Handle all possible exceptions for a program that takes two int number from the user and print sum.

Homework Equations



The Attempt at a Solution



import java.util.Scanner;

public class Task1
{
}
 
Physics news on Phys.org
Surely you can write the program that reads two int without exceptions right? we can't help if you don't show some effort.