fork download
  1. import java.util.Scanner;
  2. class Main {
  3. public static void main(String[] args){
  4.  
  5. Scanner sc = new Scanner (System.in);
  6.  
  7. String str = "";
  8. String str1 = "I like rain!";
  9. String str2 = new String ("But I got cold easily: (");
  10.  
  11.  
  12. System.out.println(str1);
  13. System.out.println(str2);
  14.  
  15. str = sc.next();
  16. System.out.println(str);
  17.  
  18. str = sc.nextLine();
  19. System.out.println(str2);
  20.  
  21. }
  22. }
Success #stdin #stdout 0.17s 56640KB
stdin
abc def ghi
stdout
I like rain!
But I got cold easily: (
abc
But I got cold easily: (