I am just a beginner in java coding.
Recently i got this error and was unable to solve it. Please help me with this.
exception in thread "main" java.lang.illegalstateexception: scanner closed
To resolve the issue one must close the scanner and then
call nextInt on it
calc c = new calc();
System.out.print("Enter the first number:");
and your code will work