Hello,
I am using a scanner for reading the input and I want it to also split when newlines are being found. Now I assumed I could do that with the .useDelimiter.
So I have inserted that code and it seemed to be working. But all of a sudden strange things started occuring and I found out that this happened when there are comma "," is the input. It appearently also splits at a comma. Does anyone have a resolution for this, because this should not be the case.
Thanks in advance.Code:private static Scanner scanner; scanner = new Scanner(System.in, "ISO-8859-1"); scanner.useDelimiter("\n|\r\n|\r");
/update: Never mind I already found the problem, I am using the comma as a seperator in my program and there is where it went wrong


Reply With Quote