Detect the Email Addresses

  • + 1 comment

    Before manipulation of number, I added another condition becasue of following statment : In case any of the values are ≤0, print "java.lang.NumberFormatException: All the values must be positive" without quotes and terminate the program.

    Main reason that your code didn't work properly is the position of declaration which is Scanner.

    Final output value also should check whether the value is bigger than zero or not.