i want to input a String like america south korea japan
and want to store it in array. I am able to do it for countries having one word name but for text having more than one word eg how can i add south korea nextLine() is not working i did this.
String c=new String[2];
for(int i=0;i<3;i++)
{
c=sc.next(); //taking one word
//tried sc.nextLine() also;
}