This exact program runs fine in other editors:
But when I run it in UEStudio I get this error that says "Exception in thread "main" java.util.NoSuchElementException
at Java.util.Scanner.throwFor(Scanner.java:838)...
and it says some other stuff...
at AddingInt.main(AddingInt.java:16)
I'm perplexed. Code which runs fine in other Java IDE's and editors does not run in UEStudio?
Code: Select all
import java.util.Scanner;
public class AddingInt
{
public static void main(String args[])
{
Scanner input = new Scanner(System.in);
int x;
int y;
int sum;
System.out.print("\nEnter first integer: ");
x = input.nextInt();
System.out.print("Enter second integer: ");
y = input.nextInt();
sum = x + y;
System.out.println("The sum is: " + sum);
}
}
at Java.util.Scanner.throwFor(Scanner.java:838)...
and it says some other stuff...
at AddingInt.main(AddingInt.java:16)
I'm perplexed. Code which runs fine in other Java IDE's and editors does not run in UEStudio?