• + 7 comments

    just add one more command-> sc.nextLine(); before String s = sc.nexLine(); command. Your code will run like charm. Cheers! have fun.