Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import org.apache.commons.lang.StringUtils;

public class Main {
    public static void main(String[] args) {
        String source = "this is a test";
        String word = "is";

        int wordFound = StringUtils.countMatches(source, word);

        System.out.println(wordFound);
    }
}