how to find a word in a string java

how to find a word in a string java
/**
 * @author lautturi.com
 * Java example: java find word in string 
 */

import java.util.*;

public class Lautturi {
	
	public static void main(String[] args) throws IOException  {

		String wordToFind="java";
		String str = "hello lautturi java world!";
		
		int pos;
	    if((pos=str.indexOf(wordToFind))!=-1){
	    	System.out.println("Found "+wordToFind+" at position "+pos);
	    }
	}
	
}
S‮ww:ecruo‬w.lautturi.com

output:

Found java at position 15
Created Time:2017-09-11 16:07:17  Author:lautturi