View Code of Problem 58

import java.util.Scanner;

public class Main
{
  public static void main(String[] args)
  {
    Scanner scan=new Scanner(System.in);
    String str=scan.nextLine();
    String[] str1=str.split("\s+");
    System.out.print(str1.length);
  }
}
/*
Main.java:9: error: illegal escape character
    String[] str1=str.split("\s+");
                              ^
1 error
*/

Double click to view unformatted code.


Back to problem 58