Question: IN JAVA Take a line from System.in using nextLine() of Scanner. Assume that the line contains ;,, so you call a method of the String
IN JAVA

Take a line from System.in using nextLine() of Scanner. Assume that the line contains ";,", so you call a method of the String class to split it using ";" as the delimiter, which will give you an array of Strings. Convert the first String in the array to an int. In case of some error (e.g. an input that does not match the intended type), catch the exception, and in the handling, states "Wrong input
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
