1 import java.util.Scanner;
2
3public class Main{
4 public static void main(String args[]){
5
6 Scanner scan= new Scanner(System.in);
7
8 //For string
9
10 String text= scan.nextLine();
11
12 System.out.println(text);
13
14 //for int
15
16 int num= scan.nextInt();
17
18 System.out.println(num);
19 }
20 /*Is better to create another instance of Scanner if you have to use both nextline
21 and nextInt because they can conflict each other
22 */
23
24}