I'm trying to fill an array of 2 elements with a element from another array, split by "." but it doesn't fill (for instance, the input is "83.105" and i need the first element to be "83" and the second "105"). When i try to get the 0 element from numberParts array it shows out of bounds exception. I'm really confused since this method is working on C# but not Java.
String[] inputNumbers = console.nextLine().split(" ");
String[] numberParts = inputNumbers[0].split(".");
System.out.println(numberParts[0]);