import java.util.Scanner;
class testa{
public static void main(String args[]){
char m[ ] = new char[10];
int i,j;
Scanner sc = new Scanner(System.in);
for(i=0;i<5;i++){
m[i]=sc.next();//I can do it via bufferedReader but how to o it with Scanner
}
for(j=0;j<5;j++)
System.out.println(m[j]);
}
}
Now the problem is that i cannot input value and execute it correctly using Scanner class but i can with bufferedreader which i dont want to do.How do i make this program work? Sample input:qwerty Sample output: q w e r t y