Hi Everyone,
i got problem with scanner class it was compiling with no errors but it is thrown an Input MisMatch exception when excuting and the code is given below.
import java.util.*;
public class practiseQ142{
public static void main(
String args[]){
String ip="10,23,65";
Scanner src=new Scanner(ip);
src.useDelimiter(" , ");
int a=0;
while(src.hasNext()){
a+=src.nextInt(); }
System.out.println(a);
}
}