Make different object of Scanner and use it to take string

Scanner in2 = new Scanner(System. in);
//
//
//
studentNames[j] = in2.nextLine();