I want to get 3 strings from console and followed print the values, my problem is to get 3 input from user using for loop , but only 2 input values are received and printed here is my code.
int rockSize=sc.nextInt();
String[] rock=new String[rockSize];
for(int i=0;i<rock.length;i++)
rock[i]=sc.nextLine();