Test: Computer Science

1.

Identify a user error that could occur in this program

 

UserInput ui = new UserInput(); // input from the user

int s = (Integer)ui;

System.out.println(s);

The user input could not be an integer

The user can never do anything wrong

There is nothing wrong

The parseInt statement is incorrect

1/1 questions

0%
Learning Tools by Varsity Tutors