Does it make any difference whether I create an object, store it, then call a method, and directly calling the method with (new object).method?
String s=sc.nextLine();
String[] ss=s.split(" ");//1st method
String[] ssnew=(sc.nextLine()).split(" ");//2nd method
Doing this for a coding contest with hidden test cases, 1 out of 7 test cases doesn't pass when using the second method, but all 7 pass while using the first method. There is no input before or after this, only a print statement.