Java Substring Comparisons

  • + 0 comments

    Scanner scan = new Scanner(System.in); String s = scan.nextLine(); int k = Integer.parseInt(scan.nextLine()); int N = s.length()-(k-1); String[] arr = new String[N]; for(int i=0;i