This is a part of my code.
String name=sc.nextLine();
int no=sc.nextInt();
The problem is if I write sc.next() instead of sc.nextLine() then i can pass only "james" not "james watson".
when i write sc.nextLine() then it takes integer not string.Why is it so?
Please Help!!!