Answer:
The correct answer for the given question is option(A) i.e Throws an exception .
Step-by-step explanation:
following are the code in java language
public class Main
{
public static void main (String[]args)
{
int userNumber =14;
String userEntry="two";
userNumber= Integer.parseInt(userEntry);
System.out.println(userNumber);
}
}
The main class throws an EXCEPTION java.lang.NumberFormatException
because we cannot convert the string userEntry into integer.
output
Exception in thread java.lang.NumberFormatException