Hi i'm having trouble saving my string.split value to an array my array is empty after i use the following code.
Scanner in = new Scanner(System.in);
String input = in.nextLine();
in.close();
if(input.matches("^[0-6][.][0-6]$"))
{
b = false;
String[] coordinates = input.split(".");
int c1 = Integer.parseInt(coordinates[0]);
int c2 = Integer.parseInt(coordinates[1]);
playingfield.PlayTurn(c1, c2);
it tells me coordinates[0] and [1] are null.
Everything up to that point works and the Regex is correct to As i can just print the String there and it works fine