Code example for Scanner

Methods: nextnextLine

0
package pack2; 
 
import java.util.Scanner; 
 
public class Main { 
 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String x = sc.nextLine();
		String y = sc.next();
		System.out.println(x + " , " + y);
	} 
}